Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions asset-account/terraform/cloudformation-stack/.module.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[module]
name = "aws-elastio-asset-account-cloudformation-stack"
name = "aws-elastio-asset-account-cloudformation-stack"
version = "1.0.0"

description = "Terraform module for creating the Elastio Asset Account CloudFormation stack"
type = "terraform"
version = "0.33.1"
type = "terraform"
34 changes: 15 additions & 19 deletions asset-account/terraform/cloudformation-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the basic [usage example](./examples/basic/main.tf).
```tf
module "elastio_asset_account" {
source = "terraform.cloudsmith.io/public/elastio-asset-account-cloudformation-stack/aws"
version = "0.33.1"
version = "1.0.0"

// Provide input parameters
}
Expand All @@ -26,13 +26,13 @@ module "elastio_asset_account" {
| Name | Version |
| ------------------------------------------------------------------------ | ------- |
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | ~> 1.9 |
| <a name="requirement_aws"></a> [aws](#requirement_aws) | ~> 5.0 |
| <a name="requirement_aws"></a> [aws](#requirement_aws) | >= 5.0 |

## Providers

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

## Modules

Expand All @@ -46,22 +46,18 @@ No modules.

## Inputs

| Name | Description | Type | Default | Required |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ----------------------- | :------: |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_stack_name"></a> [stack_name](#input_stack_name) | The name of the CloudFormation StackSet. | `string` | `"ElastioAssetAccount"` | no |
| <a name="input_tags"></a> [tags](#input_tags) | Additional tags to apply to all resources created by this stack. | `map(string)` | `{}` | no |
| <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 |
| <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 |
| Name | Description | Type | Default | Required |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ----------------------- | :------: |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_stack_name"></a> [stack_name](#input_stack_name) | The name of the CloudFormation StackSet. | `string` | `"ElastioAssetAccount"` | no |
| <a name="input_tags"></a> [tags](#input_tags) | Additional tags to apply to all resources created by this stack. | `map(string)` | `{}` | no |
| <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 |
| <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 |

## Outputs

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module "elastio_asset_account" {
source = "../../"

template_url = var.template_url
encrypt_with_cmk = true
iam_role_arn = time_sleep.iam.triggers.deployer_role_arn
template_url = var.template_url
iam_role_arn = time_sleep.iam.triggers.deployer_role_arn
}

resource "aws_iam_role" "deployer" {
Expand Down
10 changes: 0 additions & 10 deletions asset-account/terraform/cloudformation-stack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,4 @@ resource "aws_cloudformation_stack" "this" {
policy_url = var.policy_url
iam_role_arn = var.iam_role_arn
timeout_in_minutes = var.timeout_in_minutes

parameters = {
for key, value in {
iamResourceNamesPrefix = var.iam_resource_names_prefix
iamResourceNamesSuffix = var.iam_resource_names_suffix
encryptWithCmk = var.encrypt_with_cmk
lambdaTracing = var.lambda_tracing
} :
key => tostring(value)
}
}
52 changes: 3 additions & 49 deletions asset-account/terraform/cloudformation-stack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ variable "tags" {

variable "stack_name" {
description = "The name of the CloudFormation StackSet."
type = string
nullable = false
default = "ElastioAssetAccount"
type = string
nullable = false
default = "ElastioAssetAccount"
}

variable "disable_rollback" {
Expand Down Expand Up @@ -84,49 +84,3 @@ variable "timeout_in_minutes" {
type = number
default = null
}

#####################################################
## Optional parameters of the CloudFormation stack ##
#####################################################

variable "iam_resource_names_prefix" {
description = <<-DESCR
Add a custom prefix to names of all IAM resources deployed by this stack.
DESCR

type = string
nullable = false
default = ""
}

variable "iam_resource_names_suffix" {
description = <<-DESCR
Add a custom prefix to names of all IAM resources deployed by this stack.
DESCR

type = string
nullable = false
default = ""
}

variable "encrypt_with_cmk" {
description = <<-DESCR
Provision an additional customer-managed KMS key to encrypt Lambda environment variables.
This increases the cost of the stack.
DESCR

type = bool
nullable = false
default = false
}

variable "lambda_tracing" {
description = <<-DESCR
Enable AWS X-Ray tracing for Lambda functions.
This increases the cost of the stack.
DESCR

type = bool
nullable = false
default = false
}
2 changes: 1 addition & 1 deletion asset-account/terraform/cloudformation-stack/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
version = ">= 5.0"
}
}
}
7 changes: 4 additions & 3 deletions asset-account/terraform/stack-set/.module.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[module]
name = "aws-elastio-asset-account-stack-set"
name = "aws-elastio-asset-account-stack-set"
version = "1.0.0"

description = "Terraform module for creating the Elastio Asset Account CloudFormation StackSet"
type = "terraform"
version = "0.33.2"
type = "terraform"
Loading