terraform-provider-aws

Terraform EKS tagging

匆匆过客 提交于 2021-01-20 11:37:28
问题 I am having this issue of Terraform EKS tagging and don't seem to find workable solution to tag all the VPC subnets when a new cluster is created. To provide some context: We have one AWS VPC where we deployment several EKS cluster into the subnets. We do not create VPC or subnets are part of the EKS cluster creation. Therefore, the terraform code creating a cluster doesn't get to tag existing subnets and VPC. Although EKS will add the required tags, they are automatically removed next time

Terraform EKS tagging

我的梦境 提交于 2021-01-20 11:37:10
问题 I am having this issue of Terraform EKS tagging and don't seem to find workable solution to tag all the VPC subnets when a new cluster is created. To provide some context: We have one AWS VPC where we deployment several EKS cluster into the subnets. We do not create VPC or subnets are part of the EKS cluster creation. Therefore, the terraform code creating a cluster doesn't get to tag existing subnets and VPC. Although EKS will add the required tags, they are automatically removed next time

Terraform JSON generation

你。 提交于 2021-01-05 09:11:59
问题 I'm trying to create an AWS dashboard using terraform to display the S3 metrics. I was thinking of looping through all the S3 buckets stored in a list variable and generate the dashboard json. The for loop is able to add the metrics, but I'm not able to remove the trailing comma, which results in an erroneous json. Is there an easy way to fix this json using this approach? Is there a better way to do json processing? Should I be using terraform for this processing? Code snippet :- dashboard

Terraform JSON generation

北慕城南 提交于 2021-01-05 09:10:58
问题 I'm trying to create an AWS dashboard using terraform to display the S3 metrics. I was thinking of looping through all the S3 buckets stored in a list variable and generate the dashboard json. The for loop is able to add the metrics, but I'm not able to remove the trailing comma, which results in an erroneous json. Is there an easy way to fix this json using this approach? Is there a better way to do json processing? Should I be using terraform for this processing? Code snippet :- dashboard

Unknown token IDENT aws_region

杀马特。学长 韩版系。学妹 提交于 2021-01-03 06:54:38
问题 I have just run Terraform upgrade. My code was updated but now it shows some errors. The first was: variable "s3_bucket_name" { type = list(string) default = [ "some_bucket_name", "other_bucket_name", ... ] } It doesn't like list(string) . I went back to square one and redid the entire Getting Started tutorial. It said that I could either explicitly state type = list or I could implicitly state it by leaving out type and just using the [square brackets]. I saw here: unknown token IDENT list

Documentation for AWS infrastructure as code

∥☆過路亽.° 提交于 2020-12-15 19:43:24
问题 Recently, while trying to build a terraform IaC, I found that I couldn’t get the API Gateway to route to the Lambda properly. It turned out that when using the console AWS automatically assigns the permissions the gateway needs for the Lambda, but with IaC in terraform this must be assigned explicitly. The above is understandable but for a newbie, to both AWS and terraform, confusing. Is there documentation which explains the required components within an infrastructure connection, such as

Documentation for AWS infrastructure as code

喜你入骨 提交于 2020-12-15 19:41:41
问题 Recently, while trying to build a terraform IaC, I found that I couldn’t get the API Gateway to route to the Lambda properly. It turned out that when using the console AWS automatically assigns the permissions the gateway needs for the Lambda, but with IaC in terraform this must be assigned explicitly. The above is understandable but for a newbie, to both AWS and terraform, confusing. Is there documentation which explains the required components within an infrastructure connection, such as

Documentation for AWS infrastructure as code

风流意气都作罢 提交于 2020-12-15 19:39:49
问题 Recently, while trying to build a terraform IaC, I found that I couldn’t get the API Gateway to route to the Lambda properly. It turned out that when using the console AWS automatically assigns the permissions the gateway needs for the Lambda, but with IaC in terraform this must be assigned explicitly. The above is understandable but for a newbie, to both AWS and terraform, confusing. Is there documentation which explains the required components within an infrastructure connection, such as

Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias already exists

落爺英雄遲暮 提交于 2020-12-15 07:20:11
问题 When running terraform apply I get the following error Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias already exists I can confirm that the resource (the KMS-Key-Alias) exists on AWS. How can this happen? How can I resolve this? 回答1: The problem is that the resource was created, but the Terraform state does not contain this resource. How this can happen the resource was created manually in AWS the resource was created using Terraform but the

Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias already exists

眉间皱痕 提交于 2020-12-15 07:19:08
问题 When running terraform apply I get the following error Terraform AlreadyExistsException: An alias with the name arn:aws:kms:XXXXX:XXXXXXXXX:alias/myalias already exists I can confirm that the resource (the KMS-Key-Alias) exists on AWS. How can this happen? How can I resolve this? 回答1: The problem is that the resource was created, but the Terraform state does not contain this resource. How this can happen the resource was created manually in AWS the resource was created using Terraform but the