Skip to content

Commit

Permalink
Add: bug fixes and schema changes to aws provider
Browse files Browse the repository at this point in the history
  • Loading branch information
g14a committed Jan 22, 2021
1 parent bc4aaab commit 89d09b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion builder/terraform_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func ProviderBuilder(provider string, providerBlock map[string]interface{}) {
if provider != "" {
providerInfo.WriteString("\nprovider \"" + provider + "\" {\n")
providerInfo = recursiveBuilder(&providerInfo, reflect.ValueOf(providerBlock))
providerInfo.WriteString("}\n")

_, err := file.TerraformFile.WriteString(providerInfo.String())
if err != nil {
Expand Down
12 changes: 3 additions & 9 deletions terraform/aws/provider_prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func ProviderPrompt() {
},
{
Field: "max_retries",
Ex: "",
Ex: "25",
Doc: "(Optional) This is the maximum number of times an API call is retried, in the case where requests are being throttled or experiencing transient failures. The delay between the subsequent API calls increases exponentially. If omitted, the default value is 25",
Validator: validators.IntValidator,
},
Expand Down Expand Up @@ -124,12 +124,12 @@ func ProviderPrompt() {

color.Green("\nEnter assume_role:\nThe assume_role configuration block supports " +
"the following optional arguments:\n1.duration_seconds\n2.external_id\n" +
"3.policy\n4.policy_arns\n5.role_arn\n6.session_name\n7.tags(not supported by this cli yet)\n")
"3.policy\n4.policy_arns\n5.role_arn\n6.session_name\n\n")

assumeRoleSchema := []types.Schema{
{
Field: "duration_seconds",
Ex: "",
Ex: "10",
Doc: "(Optional) Number of seconds to restrict the assume role session duration.",
Validator: validators.IntValidator,
},
Expand All @@ -138,12 +138,6 @@ func ProviderPrompt() {
Ex: "",
Doc: "(Optional) External identifier to use when assuming the role.",
},
{
Field: "policy",
Ex: "",
Doc: "(Optional) IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",
Validator: validators.JSONValidator,
},
{
Field: "policy_arns",
Ex: "",
Expand Down

0 comments on commit 89d09b5

Please sign in to comment.