It is designed to allow you to learn programming languages for the cloud (Python, Terraform). You can create and apply simple but tedious repetitive tasks, when and how you deployed, and our company's policies that cannot be solved through a specific solution. In particular, we apply security architecture through Terraform, the most popular IaC (Infrastructure as Code) application, and create a super simple dashboard with Python!
Introducing new features in Terraform 1.8
hello.
This is Kangmin Cheon, a cloud programming instructor who uses it in practice.
Terraform 1.8 introduces a feature called provider-defined functions
.
In simple terms, it supports functions at the provider level. Here is an example:
terraform { required_providers { aws = { source = "hashicorp/aws" } } } provider "aws" {} # result: # { # "partition": "aws", # "service": "iam", # "region": "", # "account_id": "444455556666", # "resource": "role/example", # } output "role" { value = provider::aws::arn_parse("arn:aws:iam::444455556666:role/example") } # result: # { # "partition": "aws", # "service": "elasticloadbalancing", # "region": "us-east-2", # "account_id": "123456789012", # "resource": "loadbalancer/app/my-load-balancer/1234567890123456", # } output "elb" { value = provider::aws::arn_parse("arn:aws:elasticloadbalancing:us-east-2:123456789012:loadbalancer/app/my-load-balancer/1234567890123456") }
(This is crazy...)
Since it is a feature that has been out for a long time, it is definitely lacking in many functions, but there were cases where the declarative language had to be used procedurally through various built-in functions (split, then access the index and save it to local...), and it seems that support is being provided in a more declarative way.
This is a very hot feature, so it's super simple. If you want to see it, here's the link !
Thinking about all the different functions that will be created, I feel like I've been rewarded for all the work I've done in finding and implementing built-in functions. I'm going to look into this a bit more and create a separate lecture and upload it!
thank you