Questions tagged [terraform]
Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
431
questions
1
vote
2
answers
7k
views
terraform variable inside variable
I am creating a vpc, and then subnets, route table and other vpc components, in many resources vpc id needs to be provided, in aws_subnet resource of below example, I have to provide vpc_id = "${...
0
votes
1
answer
696
views
Can't access nginx accessible on private ip but not on public ip
I'm creating resources using terraform and I have a node in the subnet 172.1.0.0 with no security group or rules assigned to the node; the node has two endpoints 22 and 80.
I used nmap to confirm ...
0
votes
1
answer
877
views
In terraform, howto attach a backing ec2 instance to an ecs service
I’m using Terraform to upload a web to AWS. This ECS, with a docker image, that errors with 500 when I try to go to it’s assigned A-record DNS name. For this service, I’ve assigned a few AWS resources:...
4
votes
1
answer
5k
views
Parameter parsing when using AWS SSM send-command from Terraform
I am using AWS SSM send-command to run a PowerShell script on an AWS instance.
The following commanad works fine in a command shell but when called in Terraform gets an error.
aws ssm send-command ...
3
votes
1
answer
2k
views
Terraform, ecs service creation fails when using a configured IAM policy
Using Terraform, ecs service creation fails when using a configured IAM policy.
Error applying plan:
1 error(s) occurred:
* aws_ecs_service.beatthemarket_service: InvalidParameterException: Unable ...
1
vote
1
answer
3k
views
Using Terraform to create GCE instances, error occuring on attaching secondary disk?
My terraform file looks like this.
resource "google_compute_disk" "sqlserversecondary" {
name = "sql-server-secondary"
type = "pd-ssd"
zone = "us-central1-a"
size = "512"
}
resource "...
3
votes
1
answer
4k
views
Terraform, getting "The module root has no resources" error on taint
Getting a The module root has no resources error on taint. I'm trying to taint a couple of null_resources. Here's the code block for null_resource.provision_first:
resource "null_resource" "...
0
votes
3
answers
2k
views
Terraform, how to provision droplet with salt-minion (masterless)
I've managed to get a local development server running with Vagrant, provisioning it with Salt in a masterless configuration. Now, I'm trying to take advantage of the existing salt states to provision ...
4
votes
1
answer
7k
views
Why is my AWS instance's private IP outside of the subnet's range?
I'm trying to launch an instance with the private IP address 172.31.32.101 using Terraform in my default VPC (CIDR 172.31.0.0/16), in the eu-west-1a subnet that has the CIDR 172.31.32.0/20. I can ...
4
votes
2
answers
3k
views
Does Terraform Deal with “known_hosts” upon changing infrastructure? If so, how?
I'm very new to terraform so maybe this is not a great question. But I'm running through [this Amazon EC2 example] and at one point it tries to SSH to the machine, I assume to install nginx. This is ...
6
votes
2
answers
3k
views
How to use terraform.io to change the image of a stateful server without downtime or data loss?
Say I have application servers, database servers, and a few dns-round-robin load balancers. All this powered by images created with Packer with deployment managed with Terraform. How do I change the ...