Skip to content

Commit 49aee44

Browse files
authored
Disable the broken accounts input in stack-set module due to a bug in Terraform AWS provider (#112)
Da bug: hashicorp/terraform-provider-aws#42172
1 parent c12ccfd commit 49aee44

File tree

6 files changed

+29
-21
lines changed

6 files changed

+29
-21
lines changed

asset-account/terraform/stack-set/.module.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
name = "aws-elastio-asset-account-stack-set"
33
description = "Terraform module for creating the Elastio Asset Account CloudFormation StackSet"
44
type = "terraform"
5-
version = "0.33.0"
5+
version = "0.33.1"

asset-account/terraform/stack-set/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ See the `examples` directory for some examples of how this module can be used:
1616
```tf
1717
module "elastio_asset_account" {
1818
source = "terraform.cloudsmith.io/public/elastio-asset-account-stack-set/aws"
19-
version = "0.33.0"
19+
version = "0.33.1"
2020
2121
// Provide input parameters
2222
}
@@ -52,7 +52,6 @@ No modules.
5252

5353
| Name | Description | Type | Default | Required |
5454
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
55-
| <a name="input_accounts"></a> [accounts](#input_accounts) | The IDs AWS accounts where you want to create stack instances.<br/><br/>Specify `accounts` only if you are using `SELF_MANAGED` permissions model.<br/>If you are using the `SERVICE_MANAGED` permissions model specify `deployment_targets` instead. | `list(string)` | `null` | no |
5655
| <a name="input_administration_role_arn"></a> [administration_role_arn](#input_administration_role_arn) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_set#administration_role_arn-1) | `string` | `null` | no |
5756
| <a name="input_auto_deployment"></a> [auto_deployment](#input_auto_deployment) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_set#auto_deployment-1) | <pre>object({<br/> enabled = optional(bool)<br/> retain_stacks_on_account_removal = optional(bool)<br/> })</pre> | `null` | no |
5857
| <a name="input_call_as"></a> [call_as](#input_call_as) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack_set#call_as-1) | `string` | `null` | no |

asset-account/terraform/stack-set/examples/self-managed/admin.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ module "elastio_asset_account" {
1616
template_url = var.template_url
1717

1818
# We are deploying just into a single asset account in this example
19-
accounts = [local.asset_account_id]
19+
deployment_targets = {
20+
accounts = [local.asset_account_id]
21+
}
2022

2123
administration_role_arn = aws_iam_role.admin.arn
2224
}

asset-account/terraform/stack-set/examples/self-managed/main.tf

Whitespace-only changes.

asset-account/terraform/stack-set/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ resource "aws_cloudformation_stack_set" "this" {
6060
resource "aws_cloudformation_stack_instances" "this" {
6161
stack_set_name = aws_cloudformation_stack_set.this.name
6262

63-
accounts = var.accounts
64-
regions = [var.stack_instances_region]
63+
# Temporarily disabled to prevent the users from the footgun of this bug
64+
# in Terraform AWS provider: https://github.com/hashicorp/terraform-provider-aws/issues/42172
65+
#
66+
# accounts = var.accounts
67+
68+
regions = [var.stack_instances_region]
6569

6670
dynamic "deployment_targets" {
6771
for_each = var.deployment_targets[*]

asset-account/terraform/stack-set/variables.tf

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ variable "template_url" {
1616
nullable = false
1717
}
1818

19-
variable "accounts" {
20-
description = <<-DESCR
21-
The IDs AWS accounts where you want to create stack instances.
19+
# Temporarily disabled to prevent the users from the footgun of this bug
20+
# in Terraform AWS provider: https://github.com/hashicorp/terraform-provider-aws/issues/42172
21+
#
22+
# variable "accounts" {
23+
# description = <<-DESCR
24+
# The IDs AWS accounts where you want to create stack instances.
2225

23-
Specify `accounts` only if you are using `SELF_MANAGED` permissions model.
24-
If you are using the `SERVICE_MANAGED` permissions model specify `deployment_targets` instead.
25-
DESCR
26+
# Specify `accounts` only if you are using `SELF_MANAGED` permissions model.
27+
# If you are using the `SERVICE_MANAGED` permissions model specify `deployment_targets` instead.
28+
# DESCR
2629

27-
type = list(string)
28-
default = null
29-
}
30+
# type = list(string)
31+
# default = null
32+
# }
3033

3134
variable "deployment_targets" {
3235
description = <<-DESCR
@@ -83,16 +86,16 @@ variable "auto_deployment" {
8386

8487
variable "stack_set_name" {
8588
description = "The name of the CloudFormation StackSet."
86-
type = string
87-
nullable = false
88-
default = "ElastioAssetAccount"
89+
type = string
90+
nullable = false
91+
default = "ElastioAssetAccount"
8992
}
9093

9194
variable "stack_set_description" {
9295
description = "The description of the CloudFormation StackSet."
93-
type = string
94-
nullable = false
95-
default = <<-DESCR
96+
type = string
97+
nullable = false
98+
default = <<-DESCR
9699
Elastio Asset Account StackSet creates IAM roles to link the AWS accounts with
97100
the Elastio Connector. This allows the Elastio Connector to scan the assets
98101
available in the account where the Elastio Asset Account stack instances are

0 commit comments

Comments
 (0)