terraform

Fargate Task with Nat Gateway fails to connect with RDS database

我的梦境 提交于 2021-02-11 14:34:54
问题 Basically, I'm follow these two guides: Deploying Hasura on AWS with Fargate, RDS and Terraform Deploying Containers on Amazon’s ECS using Fargate and Terraform: Part 2 I have: Postgres RDS Database deployed in 'Multi-AZ' My python/flask app deployed in Fargate across multiple AZ's I run a migration inside the task definition before the app ALB Load balancing between the tasks Logging for RDS, ECS and ALB into Cloudwatch Logs. A NAT gateway with an Elastic IP for each private subnet to get

Deploy a Dataflow with Terraform

孤人 提交于 2021-02-11 14:27:03
问题 I'm trying to deploy a Dataflow template with Terraform in GCloud. There are several tutorial which include some terraform code. There are 2 options:Use module like the following link or use resource like the following link With both options I have the following error: Error: googleapi: got HTTP response code 502 with body: <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> <title>Error 502 (Server Error)!!1<

Security rule has invalid Port range terraform

回眸只為那壹抹淺笑 提交于 2021-02-11 14:21:46
问题 Unable to provide destination_port_range for nsg security rule in azure using terraform. Terraform v0.12.28 provider.azurerm v2.18.0 security_rule { name = "databricks-control-plane-inbound-rule" priority = 110 direction = "Inbound" access = "Allow" protocol = "Tcp" source_port_range = "*" destination_port_range = 225557 } Error: Failure sending request: StatusCode=400 -- Original Error: Code="SecurityRuleInvalidPortRange" Message="Security rule has invalid Port range. Value provided: 225557.

How to enable CloudWatch logging and X-ray for stepfunction in Terraform?

微笑、不失礼 提交于 2021-02-11 14:13:57
问题 In AWS console, we can easily enable cloudwatch logging and X-ray for a step function statemachine, but I want my resource fully managed by Terraform, from this page:https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sfn_state_machine It seems like Terraform doesn't support this at the moment (also see: https://github.com/hashicorp/terraform-provider-aws/issues/12192) Does anyone know if there is any workaround to achieve this? I'd really like to be able to enable

Update existing app service with Terraform

有些话、适合烂在心里 提交于 2021-02-11 13:01:44
问题 in my Azure account a have some resources. Resource groups, app services, storage accounts... I've created these resources by using the Azure portal or Powershell. Then i've written a terraform script to add other resources and update some of the existing ones. In particular i'm interested in updating the app service. I want to add some settings and a managed identity to it. What happens is that terraform says: "look, there is already an app service with the name you specified". I tried to

How to parse stepfunction executionId to SageMaker batch transform job name?

霸气de小男生 提交于 2021-02-11 12:29:35
问题 I have created a stepfunction, the definition for this statemachine below ( step-function.json ) is used in terraform (using the syntax in this page:https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html) The first time if I execute this statemachine, it will create a SageMaker batch transform job named example-jobname , but I need to exeucute this statemachine everyday, then it will give me error "error": "SageMaker.ResourceInUseException", "cause": "Job name

Json parsing error when running 'aws stepfunctions update-state-machine' via Terraform

杀马特。学长 韩版系。学妹 提交于 2021-02-11 12:24:54
问题 I'm following the answer in this question, I tried to enable x-ray and it works, code I used: resource "null_resource" "enable_step_function_logging" { triggers = { state_machine_arn = aws_sfn_state_machine.sfn_state_machine.arn } provisioner "local-exec" { command = "aws stepfunctions update-state-machine --state-machine-arn ${self.triggers.state_machine_arn} --tracing-configuration enabled=true" } } Now I want to enable cloudwatch logging ' --logging-configuration=xxx' part, but I keep

Use output value from module that has a for_each set

瘦欲@ 提交于 2021-02-11 04:31:39
问题 I had my code setup to export the dynamic private ip address when the VM is created. I did this via an outputs value. Since then, I have updated to tf 0.13 and I'm using a for_each in the module but when I reference this value now I get the below error. I'm not sure how I can export the dynamic private address attribute of the NIC now the for_each has been set to be used in the source_address_prefixes. I understand what the error is saying but not sure on correct way of exporting the value to

Use output value from module that has a for_each set

喜欢而已 提交于 2021-02-11 04:31:28
问题 I had my code setup to export the dynamic private ip address when the VM is created. I did this via an outputs value. Since then, I have updated to tf 0.13 and I'm using a for_each in the module but when I reference this value now I get the below error. I'm not sure how I can export the dynamic private address attribute of the NIC now the for_each has been set to be used in the source_address_prefixes. I understand what the error is saying but not sure on correct way of exporting the value to

Is it possible --from-file ConfigMap using kubernetes_config_map resource?

被刻印的时光 ゝ 提交于 2021-02-10 19:41:36
问题 I want to deploy metallb using terraform. metallb configuration is as follows. apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | address-pools: - name: default protocol: layer2 addresses: - 172.16.99.1-172.16.99.255 Is it possible deploy such --from-file configuration using kubernetes_config_map resource? 回答1: You can use the file() interpolation function to read the file contents. That might look like: resource "kubernetes_config_map" "config" {