Skip to content

Commit b4c64d7

Browse files
authored
Update to 1.0+ protected (asset) account stack (#120)
1 parent 4a342ff commit b4c64d7

File tree

10 files changed

+46
-175
lines changed

10 files changed

+46
-175
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[module]
2-
name = "aws-elastio-asset-account-cloudformation-stack"
2+
name = "aws-elastio-asset-account-cloudformation-stack"
3+
version = "1.0.0"
4+
35
description = "Terraform module for creating the Elastio Asset Account CloudFormation stack"
4-
type = "terraform"
5-
version = "0.33.1"
6+
type = "terraform"

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

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the basic [usage example](./examples/basic/main.tf).
1313
```tf
1414
module "elastio_asset_account" {
1515
source = "terraform.cloudsmith.io/public/elastio-asset-account-cloudformation-stack/aws"
16-
version = "0.33.1"
16+
version = "1.0.0"
1717
1818
// Provide input parameters
1919
}
@@ -26,13 +26,13 @@ module "elastio_asset_account" {
2626
| Name | Version |
2727
| ------------------------------------------------------------------------ | ------- |
2828
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | ~> 1.9 |
29-
| <a name="requirement_aws"></a> [aws](#requirement_aws) | ~> 5.0 |
29+
| <a name="requirement_aws"></a> [aws](#requirement_aws) | >= 5.0 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
| ------------------------------------------------ | ------- |
35-
| <a name="provider_aws"></a> [aws](#provider_aws) | ~> 5.0 |
35+
| <a name="provider_aws"></a> [aws](#provider_aws) | >= 5.0 |
3636

3737
## Modules
3838

@@ -46,22 +46,18 @@ No modules.
4646

4747
## Inputs
4848

49-
| Name | Description | Type | Default | Required |
50-
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ----------------------- | :------: |
51-
| <a name="input_disable_rollback"></a> [disable_rollback](#input_disable_rollback) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#disable_rollback-1) | `bool` | `null` | no |
52-
| <a name="input_encrypt_with_cmk"></a> [encrypt_with_cmk](#input_encrypt_with_cmk) | Provision an additional customer-managed KMS key to encrypt Lambda environment variables.<br/>This increases the cost of the stack. | `bool` | `false` | no |
53-
| <a name="input_iam_resource_names_prefix"></a> [iam_resource_names_prefix](#input_iam_resource_names_prefix) | Add a custom prefix to names of all IAM resources deployed by this stack. | `string` | `""` | no |
54-
| <a name="input_iam_resource_names_suffix"></a> [iam_resource_names_suffix](#input_iam_resource_names_suffix) | Add a custom prefix to names of all IAM resources deployed by this stack. | `string` | `""` | no |
55-
| <a name="input_iam_role_arn"></a> [iam_role_arn](#input_iam_role_arn) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#iam_role_arn-1) | `string` | `null` | no |
56-
| <a name="input_lambda_tracing"></a> [lambda_tracing](#input_lambda_tracing) | Enable AWS X-Ray tracing for Lambda functions.<br/>This increases the cost of the stack. | `bool` | `false` | no |
57-
| <a name="input_notification_arns"></a> [notification_arns](#input_notification_arns) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#notification_arns-1) | `list(string)` | `null` | no |
58-
| <a name="input_on_failure"></a> [on_failure](#input_on_failure) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#on_failure-1) | `string` | `null` | no |
59-
| <a name="input_policy_body"></a> [policy_body](#input_policy_body) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#policy_body-1) | `string` | `null` | no |
60-
| <a name="input_policy_url"></a> [policy_url](#input_policy_url) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#policy_url-1) | `string` | `null` | no |
61-
| <a name="input_stack_name"></a> [stack_name](#input_stack_name) | The name of the CloudFormation StackSet. | `string` | `"ElastioAssetAccount"` | no |
62-
| <a name="input_tags"></a> [tags](#input_tags) | Additional tags to apply to all resources created by this stack. | `map(string)` | `{}` | no |
63-
| <a name="input_template_url"></a> [template_url](#input_template_url) | The URL of the Elastio Asset Account CloudFormation template obtained from<br/>the Elastio Portal.<br/><br/>This parameter is sensitive, because anyone who knows this URL can deploy<br/>Elastio Account stack and linking it to your Elastio tenant. | `string` | n/a | yes |
64-
| <a name="input_timeout_in_minutes"></a> [timeout_in_minutes](#input_timeout_in_minutes) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#timeout_in_minutes-1) | `number` | `null` | no |
49+
| Name | Description | Type | Default | Required |
50+
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ----------------------- | :------: |
51+
| <a name="input_disable_rollback"></a> [disable_rollback](#input_disable_rollback) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#disable_rollback-1) | `bool` | `null` | no |
52+
| <a name="input_iam_role_arn"></a> [iam_role_arn](#input_iam_role_arn) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#iam_role_arn-1) | `string` | `null` | no |
53+
| <a name="input_notification_arns"></a> [notification_arns](#input_notification_arns) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#notification_arns-1) | `list(string)` | `null` | no |
54+
| <a name="input_on_failure"></a> [on_failure](#input_on_failure) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#on_failure-1) | `string` | `null` | no |
55+
| <a name="input_policy_body"></a> [policy_body](#input_policy_body) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#policy_body-1) | `string` | `null` | no |
56+
| <a name="input_policy_url"></a> [policy_url](#input_policy_url) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#policy_url-1) | `string` | `null` | no |
57+
| <a name="input_stack_name"></a> [stack_name](#input_stack_name) | The name of the CloudFormation StackSet. | `string` | `"ElastioAssetAccount"` | no |
58+
| <a name="input_tags"></a> [tags](#input_tags) | Additional tags to apply to all resources created by this stack. | `map(string)` | `{}` | no |
59+
| <a name="input_template_url"></a> [template_url](#input_template_url) | The URL of the Elastio Asset Account CloudFormation template obtained from<br/>the Elastio Portal.<br/><br/>This parameter is sensitive, because anyone who knows this URL can deploy<br/>Elastio Account stack and linking it to your Elastio tenant. | `string` | n/a | yes |
60+
| <a name="input_timeout_in_minutes"></a> [timeout_in_minutes](#input_timeout_in_minutes) | [See docs here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudformation_stack#timeout_in_minutes-1) | `number` | `null` | no |
6561

6662
## Outputs
6763

asset-account/terraform/cloudformation-stack/examples/advanced/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
module "elastio_asset_account" {
22
source = "../../"
33

4-
template_url = var.template_url
5-
encrypt_with_cmk = true
6-
iam_role_arn = time_sleep.iam.triggers.deployer_role_arn
4+
template_url = var.template_url
5+
iam_role_arn = time_sleep.iam.triggers.deployer_role_arn
76
}
87

98
resource "aws_iam_role" "deployer" {

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,4 @@ resource "aws_cloudformation_stack" "this" {
1212
policy_url = var.policy_url
1313
iam_role_arn = var.iam_role_arn
1414
timeout_in_minutes = var.timeout_in_minutes
15-
16-
parameters = {
17-
for key, value in {
18-
iamResourceNamesPrefix = var.iam_resource_names_prefix
19-
iamResourceNamesSuffix = var.iam_resource_names_suffix
20-
encryptWithCmk = var.encrypt_with_cmk
21-
lambdaTracing = var.lambda_tracing
22-
} :
23-
key => tostring(value)
24-
}
2515
}

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

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ variable "tags" {
3131

3232
variable "stack_name" {
3333
description = "The name of the CloudFormation StackSet."
34-
type = string
35-
nullable = false
36-
default = "ElastioAssetAccount"
34+
type = string
35+
nullable = false
36+
default = "ElastioAssetAccount"
3737
}
3838

3939
variable "disable_rollback" {
@@ -84,49 +84,3 @@ variable "timeout_in_minutes" {
8484
type = number
8585
default = null
8686
}
87-
88-
#####################################################
89-
## Optional parameters of the CloudFormation stack ##
90-
#####################################################
91-
92-
variable "iam_resource_names_prefix" {
93-
description = <<-DESCR
94-
Add a custom prefix to names of all IAM resources deployed by this stack.
95-
DESCR
96-
97-
type = string
98-
nullable = false
99-
default = ""
100-
}
101-
102-
variable "iam_resource_names_suffix" {
103-
description = <<-DESCR
104-
Add a custom prefix to names of all IAM resources deployed by this stack.
105-
DESCR
106-
107-
type = string
108-
nullable = false
109-
default = ""
110-
}
111-
112-
variable "encrypt_with_cmk" {
113-
description = <<-DESCR
114-
Provision an additional customer-managed KMS key to encrypt Lambda environment variables.
115-
This increases the cost of the stack.
116-
DESCR
117-
118-
type = bool
119-
nullable = false
120-
default = false
121-
}
122-
123-
variable "lambda_tracing" {
124-
description = <<-DESCR
125-
Enable AWS X-Ray tracing for Lambda functions.
126-
This increases the cost of the stack.
127-
DESCR
128-
129-
type = bool
130-
nullable = false
131-
default = false
132-
}

asset-account/terraform/cloudformation-stack/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = "~> 5.0"
7+
version = ">= 5.0"
88
}
99
}
1010
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[module]
2-
name = "aws-elastio-asset-account-stack-set"
2+
name = "aws-elastio-asset-account-stack-set"
3+
version = "1.0.0"
4+
35
description = "Terraform module for creating the Elastio Asset Account CloudFormation StackSet"
4-
type = "terraform"
5-
version = "0.33.2"
6+
type = "terraform"

0 commit comments

Comments
 (0)