// Generate Generates a CloudFormation template used to deploy the certificate authority
Generate Generates a CloudFormation template used to deploy the certificate authority
// Generate Generates a CloudFormation template used to deploy the certificate authority
func Generate() error {
	mg.Deps(Config)
	c := config.NewSSHrimp()
	if err := c.Read(config.GetPath()); err != nil {
		return err
	}
	if modified, err := target.Path("sshrimp-ca.tf.json", config.GetPath()); err == nil && modified {
		template, err := generateTerraform(c)
		if err != nil {
			return err
		}
		ioutil.WriteFile("sshrimp-ca.tf.json", template, 0644)
	}
	if modified, err := target.Path("./terraform/policy-variables.tf", config.GetPath()); err == nil && modified {
		variableDefinitionsFile := generateVariableDefinitionsFile(c)
		ioutil.WriteFile("./terraform/policy-variables.tf", variableDefinitionsFile, 0644)
	}
	return nil
}
func Generate ( ) error { mg . Deps ( Config ) c := config . NewSSHrimp ( ) if err := c . Read ( config . GetPath ( ) ) ; err != nil { return err } if modified , err := target . Path ( " " , config . GetPath ( ) ) ; err == nil && modified { template , err := generateTerraform ( c ) if err != nil { return err } ioutil . WriteFile ( " " , template , 0644 ) } if modified , err := target . Path ( " " , config . GetPath ( ) ) ; err == nil && modified { variableDefinitionsFile := generateVariableDefinitionsFile ( c ) ioutil . WriteFile ( " " , variableDefinitionsFile , 0644 ) } return nil }
Generate Generates a CloudFormation template used to deploy the certificate authority
Generate Generates a CloudFormation template used to deploy the certificate authority
// Generate policy variable file