skip to Main Content

Running a script with Terraform – Debian

For learning purpose, I'm trying to install and setup my own Kubernetes Cluster on GCP. I want to provision my instances on GCP with a bootstrap script. Here is my google_compute_instance config resource "google_compute_instance" "default" { name = var.vm_name machine_type…

VIEW QUESTION

Redis – The parameter CacheSubnetGroupName must be provided and must not be blank

I use the module, https://github.com/cloudposse/terraform-aws-elasticache-redis to provision elasticache redis. Below are the errors when I run terraform apply. I have no clue of these errors. Terraform version: v0.13.5 module.redis.aws_elasticache_parameter_group.default[0]: Creating... module.redis.aws_elasticache_subnet_group.default[0]: Creating... Error: Error creating CacheSubnetGroup: InvalidParameterValue: The parameter CacheSubnetGroupName…

VIEW QUESTION

Cannot stop a GCP VM using terraform – Debian

I tried to stop a GCP VM in terraform using desired_status = "TERMINATED" but I get the following error code: Error: Unsupported argument on main.tf line 24, in resource "google_compute_instance" "default": 24: desired_status = "TERMINATED" An argument named "desired_status" is…

VIEW QUESTION

Make null resource to wait on aws_route53_record in Terraform – CentOS

resource "aws_route53_record" "record" { zone_id = data.aws_route53_zone.selected.zone_id name = "${var.sfs_instance_name}.example.com" type = "A" ttl = "60" records = ["${aws_eip.sfs.public_ip}"] } resource "null_resource" "sfs-ssl-certs" { connection { type = "ssh" user = "centos" host = aws_eip.sfs.public_ip private_key = file("../keys/${var.sfs_instance_name}.pem") } provisioner…

VIEW QUESTION

user_data not getting executed over instance creation – Debian

I have provided an .sh file as user_data in my Terraform script: resource "aws_instance" "alpha-terraform"{ ami=var.amis[var.region] instance_type="t2.micro" vpc_security_group_ids=[aws_security_group.alpha-terraform-sg.id] user_data = file("user_data_bootstrap.sh") key_name = "alpha-terraform" tags={ type="alpha" purpose="terraform" } } The .sh file contains: #Jenkins Installation: sudo apt update sudo apt…

VIEW QUESTION

Terraform Error: "replication_group_id": conflicts with engine_version. ( redis )

I'm trying to create an aws_elasticache_replication_group using Redis resource "aws_elasticache_cluster" "encryption-at-rest" { count = 1 cluster_id = "${var.namespace}-${var.environment}-encryption-at-rest" engine = "redis" engine_version = var.engine_version node_type = var.node_type num_cache_nodes = 1 port = var.redis_port #az_mode = var.az_mode replication_group_id = aws_elasticache_replication_group.elasticache_replication_group.id security_group_ids…

VIEW QUESTION
Back To Top
Search