DevOps, Day - 63
Terraform Variables

💻 Python | Docker | Jenkins | Networking | Git | Linux 💻
Passionate about leveraging technology to drive efficiency and deliver innovative solutions. Proficient in Python development, Docker containerization, Jenkins automation, computer networking, Git version control, and Linux administration. Skilled in collaborating with diverse teams to deliver high-quality software products. Proficient in AWS EC2 instance management and deployment.
Seeking new opportunities to apply my expertise and contribute to impactful projects. Let's connect and explore how we can work together!
Inter-personal Skills:
Communication, Adaptability, Emotional intelligence, Active listening, Collaboration.
Happy To Connect🔗😊
Feel free to reach me out😃@ --> vrishnishreevb531@gmail.com 📬

Using Map Data Type

stop and remove the running container
docker stop <container_id>
docker rm <container_id>
terraform apply


modify your main.tf file as shown
variable "my_list" {
type = list(string)
default = ["item1", "item2", "item3"]
}
variable "my_set" {
type = set(string)
default = ["item1", "item2", "item3"]
}
variable "my_object" {
type = object({
key1 = string
key2 = number
})
default = {
key1 = "value1"
key2 = 42
}
}

Now use the terraform refresh command.
terraform refresh
This command will update the state file with the current variable values.

you can use terraform show to see the current state and values of your resources and variables.

Thank you so much for reading
Follow me on LinkedIn to see interesting posts like this : )




