All Questions
Tagged with terraform amazon-web-services
132
questions
0
votes
0
answers
64k
views
Terraform error: importing EC2 Key Pair (XXXX): InvalidKeyPair.Duplicate: The keypair already exists
Terraform newbie here. I am trying to add an additional node group to existing terraform stack that has already been deployed in AWS region by someone else in my organization. I have run through ...
1
vote
2
answers
58
views
How to display all the resources present in aws using terraform command?
Terraform show command will show all the resources in the state file.
But we need to display all the resources present in AWS (or region specific), not just the one in the state file.
How to do that ...
0
votes
0
answers
37
views
How to add tags automatically to AWS Volumes with Terraform
I have the following Terraform script to deploy an EKS cluster (tags left empty to hide values)
EKS.tf
provider "aws" {
region = var.region
profile = var.profile
default_tags {
...
0
votes
1
answer
113
views
Best practices on managing Terraform project repositories
As part of a new job role, I have started learning Terraform recently. Before, my main orchestration/provisioning tool was Ansible, and the best practice at my previous place was to hold the state for ...
0
votes
0
answers
44
views
Updating csi-driver without stopping
I'm now facing this.
# module.eks_volume_provisioning.aws_eks_addon.csi_driver will be updated in-place
~ resource "aws_eks_addon" "csi_driver" {
~ addon_version ...
1
vote
1
answer
233
views
'aws s3 ls' command was hanging until setting default region
I created setup show in the image in region Oregon (us-west-2) ,and I was sure that everything was in place correctly , then I tried to do aws s3 ls from the ec2 in the private subnet , it was ...
0
votes
2
answers
68
views
S2S VPN on AWS EC2 - routing issue for VPC
I'm trying to prepare VPN setup from scratch. I used Terraform + AWS + Strongswan. Basic diagram is attached here:
AWS diagram, S2S VPN
So I have VPC_left: 172.32.0.0/16 with subnet_left: 172.32....
0
votes
1
answer
55
views
Local terraform repository, remote ec2 with assumed role
My current setup is:
My local machine (actually one for each developper)
A git repository containing my terraform configuration
An EC2 instance which assumes an IAM role which grants it permissions ...
0
votes
0
answers
72
views
How to set a pre-exiting password for an aws_db_instance resource, from a secure SSoT container while keeping it out of the state file?
I'm trying to find a solution for setting the master user password of an aws_db_instance from a pre-existing secret (which is currently in an existing Secrets Manager resource).
If I use password = ...
1
vote
1
answer
840
views
InvalidConfigurationRequest: A load balancer cannot be attached to multiple subnets in the same Availability Zone
I copy-paste the part of my main.tf file:
resource "aws_security_group" "servers" {
name = "allowservers"
description = "Allow TCP:8080 inbound traffic to ...
0
votes
1
answer
262
views
AWS instance connect decrypt password is giving error as invalid private key, how to fix it?
I have cretaed an instance using terraform code and also its key pair for windows.
To get the admin password I clicked on the below decrypt button and getting as invalid decrypt key.
Please suggest ...
0
votes
1
answer
49
views
How to import an aws_spot_instance_request into Terraform?
I'm looking for a way to import an aws_spot_instance_request into Terraform.
I already made a Spot Request on AWS console, now I would like to put this request on my code. How can I do that?
In the ...
0
votes
1
answer
658
views
How to set a default account for multiple aws providers in terraform?
I need to create resources for multiple accounts in my terraform code.
So, I have created multiple providers in aws and using the same for individual modules.
Other than above, if I create any ...
0
votes
1
answer
669
views
How do I get rid of the deprecation warnings on my aws_route_table definitions?
All of my route table definitions throw a deprecation warning during the plan/apply stages. I can't figure out how I should be defining my routes so that I stop getting these warnings.
Here's an ...
0
votes
0
answers
335
views
How to escape {{ in AWS SSM?
We're using Atlantis & Terraform to set SSM values. One of the parameters contains raw {{ ... }} in the same syntax used by SSM for dynamic parameters.
AWS SSM refuses the value with:
Error: ...