Questions tagged [terraform]
Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
33
questions
0
votes
0
answers
23
views
Cannot find upgrade path from 5.7.38 to 5.6 , GitLab CI Runners faild InvalidParameterCombination
GitLab CI Runners faild the jbo with the following error message
│ Error: Error modifying DB Instance legacy-dms: InvalidParameterCombination: Cannot find upgrade path from 5.7.38 to 5.6.
│ status ...
0
votes
0
answers
112
views
AWS EKS Cluster : InvalidParameterException: Unsupported Kubernetes minor version update ,Gitlab CI, Terraform
The following errors occur every time I run the pipeline
│ Error: error updating EKS Cluster (business-staging) version: InvalidParameterException: Unsupported Kubernetes minor version update from 1....
0
votes
0
answers
23
views
How to install VMTools on Win VM Terraform
I want to install VMTools on Win VM post deploying OS using Autounattend.xml using Terraform. Can somebody help me in this?
I am using terraform and installed WIN OS VM on my vSphere server using an ...
0
votes
0
answers
19
views
Can Terraform conditionally create a resource or use a data source?
I have a Boolean called "loose", based on it's value I want to use an existing resource or create one, let say a security group. I would like to avoid using terragrunt.
0
votes
1
answer
560
views
AWS: How to provide missing Public IPv4 DNS
UPDATE: rewritten question
I have an ec2 instance launched via terraform which is unreachable; I manually launched the exact same type of instance, based on the exact same image and was able to ...
1
vote
1
answer
49
views
Persisting data for amazon ec2 instance running postgres
I am provisioning a cheap postgres instance for myself by installing directly on amazon ec2.
Everything will be deployed using terraform.
I would like the database data to persist between restarts / ...
0
votes
1
answer
92
views
Terraform setup of postgres conf files (pg_hba_conf + postgresql.conf) via User Data on AWS ec2 instance
I am setting up a cheap postgres server on amazon ec2, using Terraform.
I know I can add a User Data file when setting up a ec2 instance.
I know that with terraform, I can provide that User Data ...
0
votes
0
answers
346
views
Point in time restoration of RDS with Terraform
I have a Terraform codebase executed by a Jenkins pipeline that deploys an RDS (aurora/postgres) cluster with automated backups enabled alongside the other components (ex. ec2 instances). The input ...
0
votes
1
answer
68
views
What IAM policy is appropriate for gitlab S3 buckets when using KMS encryption?
I'm setting up GitLab with S3 storage backend and would like to use KMS to encrypt the buckets. I'd like to avoid giving out permissions broadly. I'm using terraform to provision these resources.
How ...
0
votes
1
answer
352
views
How can I employ a "truly" dynamic inventory with Ansible, which changes along the way when new hosts become reachable?
I provision virtual machines dynamically and they become reachable along the way, whilst my playbook is already executing. How do I obtain a "truly" dynamic inventory?
By "truly" ...
1
vote
1
answer
30
views
Downloading Terraform onto linux OCI VM
I am currently trying to play around with some tf scripting in an OCI compartment I have access to.
My current position is:
I have successfully spun up a VM through the OCI console running
Linux 8 on ...
1
vote
0
answers
324
views
Terraform nested maps for_each
I have created this terraform variable.
variable "test" {
default = {
map1 = {
secrets = {
"user" = "user"
"pass" = "123456&...
1
vote
2
answers
3k
views
Terraform: Interate over map and access child values
I have a terraform variable defined like that:
variable "domains" {
default = {
instance01 = [
"example.com",
"www.example.com",
"staging....
0
votes
0
answers
141
views
Terraform AWS - cannot connect to EC2 instance (SSH port is not accessible from outside)
I am trying to build myself an small EC2 instance that is being launched into an VPC with EIB and a Subnet / Internet Gateway and Security Groups.
main.tf
resource "aws_instance" "live&...
0
votes
1
answer
66
views
Terraform - huaweicloudstack provider - unable to login with ssh key
With the help of terraform and huaweicloudstack provider I created ECS instance with specific ssh key, but I cannot login nor with key, neither with admin password. If I create machine manually ...
0
votes
2
answers
239
views
less -R does not show colors when processing ANSI colored text via a pipe
The command terraform show does NOT show colored text but the command terraform show | less shows output with what seem to be text color codes:
ESC[0m#module.vpc.module.label.data.null_data_source....
0
votes
1
answer
328
views
What is the proper syntax to access attribute (public_ip) of a resource (aws_instance) with count from another resource (null_resource)
I am new to terraform and this issue is perhaps addressed earlier. Unfortunately, I am not able to find one.
Question: What is the proper syntax to access attribute (public_ip) of a resource (...
0
votes
0
answers
132
views
terraform init command failing on authorization
Terraform init is failing on authenticating. I have manually specified access key, etc in the vars file as specified below.
When I am looking at terraform init log, it is erroring out on different ...
0
votes
0
answers
744
views
Not able to run terraform from jenkins
I am trying to run a terraform command from jenkins pipeline but I am getting an error stating that, "terraform command not found". I have installed terraform plugins as well as in the system where ...
1
vote
1
answer
438
views
Hashicorp Vault PKI Intermediate request missing private key
I try to set up some PKI structure, but when I request an intermediate CSR from vault, no private key is sent back. Neither in Terraform where I try to implement it, nor via the API.
I tried:
The ...
0
votes
1
answer
814
views
Authenticate Terraform with Okta
The company I work for uses a legacy login from okta for AWS.
Thus, in order to use the aws-cli, the aws-okta utility is needed, which requires okta MFA before running any aws-cli command.
I'm ...
1
vote
0
answers
1k
views
to create a tomcat server by terraform code [closed]
provider"aws" {
access_key = "AKIAJ7STPAZVP4ZT74HQ"
secret_key = "YRxdYqpOLDRCnPcKMBTL0dCSTFGILdd0brw2LlWq"
region = "us-east-1"
}
resource "aws_instance" "example" {
ami = "ami-...
0
votes
1
answer
161
views
Install issue with Terraform on centos 7
Whenever I run a terraform install on linux using:
wget https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip
sudo unzip ./terraform_0.11.13_linux_amd64.zip
sudo mv ...
1
vote
0
answers
465
views
Terraform with tflint in VSCode [closed]
I've found some issues with tflint parsing some values when I try to access data in some maps.
First of all, I create aws_health_check with count set to 2.
Then, I create aws_dns record, with same ...
0
votes
0
answers
177
views
random_pet in Terraform: Error: Cycle:
I am trying to generate random hostnames for a couple of servers. However when running terraform apply I get an error message "Error: Cycle: random_pet.swm01_managers, hcloud_server.swm01_managers"
...
1
vote
3
answers
9k
views
How to uninstall terraform - Windows PC
I've been looking around on multiple sites on "how to uninstall Hashicorp's Terraform" and I only get back - "Install" results.
Does anyone have info on this?
I did look on Hashicorps' site but ...
2
votes
0
answers
722
views
terraform - remote backend. Error locking state: error acquiring the state lock: resource not found
ill start off by saying I am fairly new to using Terraform so if this is a dumb question I apologize in advanced.
So, I am getting the error listed in the title when attempting to run any "terraform ...
0
votes
1
answer
566
views
How to add existing role to existing ec2 instance using terraform?
I am running following code but getting exit status 255 error
My resource.tf file
resource "null_resource" "create-instance-profile" {
provisioner "local-exec" {
command = "aws iam create-...
0
votes
0
answers
317
views
Join a VM to domain automatically which was created using terraform
How do I join a VM created using terraform to domain?
I tried using resource azurerm_virtual_machine_extension with azure,VM got created successfully but domain joining dint happen.
Error:Code="...
1
vote
0
answers
64
views
Terraform , need help to import existing ressource to a module ressource
I would like to import an existing resource into my module.
This is my "old" vpc file: https://pastebin.com/DVsacfwt
My new one using the terraform registry vpc module: https://pastebin.com/KDrA0Db3
...
1
vote
1
answer
2k
views
Terraform AWS Security Group Ingress Rules
How do you define multiple Ingress rules in an AWS Security Group with Terraform?
I've tried this:
resource "aws_security_group" "sg_allowall" {
name = "${var.prefix}-allow"
ingress {
...
1
vote
3
answers
4k
views
how to install terraform on linux
I'm trying to install terraform on linux but getting and error
curl -o https://releases.hashicorp.com/terraform/0.11.2/terraform_0.11.2_linux_amd64.zip
its giving error as
curl: no URL specified!
...
2
votes
1
answer
889
views
Connect to Azure machine via public ip from terraform
I successfull made the virtual machine in Azure with Terraform ( from a Packer image). After the Virtual machine created, I would run some commands remotely on the newly created machine.
The machine ...