반응형
terraform init
→terraform plan
→terraform apply
provider.tf
provider "aws" { profile = "{PROFILE_NAME}" region = "{REGION}" }
ec2_test.tf
resource "aws_instance" "tf_test_ec2" { ami = "ami-00000000000000000" instance_type = "t2.nano" subnet_id = "subnet-00000000000000000" private_ip = "10.100.100.100" tags = { Name = "TF_test_ec2" } vpc_security_group_ids = [ "sg-00000000000000000", "sg-00000000000000001", ] key_name = "tf_test_key" }
반응형
'📂 IaC > Terraform' 카테고리의 다른 글
[Terraform] Variable 입력 변수 (0) | 2022.09.03 |
---|---|
[Terraform] Error: Incompatible provider version (0) | 2022.08.23 |
[Terraform] Provider, Resource, Data Source, Variable, Output, Locals, Module (0) | 2022.08.11 |
[Terraform] Configuration file과 HCL (0) | 2022.08.08 |
[IaC/TF] Terraform 설치 (0) | 2021.11.04 |