# var variable nhncloud_info { type =map(string) default = { user_name = "topasvga@naver.com" tenant_id = "0cc8a9fb6ad32d7cf43" password = "test" auth_url = "https://api-identity-infrastructure.nhncloudservice.com/v2.0" } } variable passwd { type = string default = "test" sensitive =true } variable region { type = map(string) default = { kr1 = "KR1" kr2 = "KR2" } } # pro # Define required providers terraform { required_version = ">= 1.0.0" required_providers { nhncloud = { source = "nhn-cloud/nhncloud" version = "1.0.2" } } } provider "nhncloud" { user_name = var.nhncloud_info["user_name"] tenant_id = var.nhncloud_info["tenant_id"] password = var.passwd auth_url = var.nhncloud_info["auth_url"] region = var.region["kr2"] } # vpc #vpc resource "nhncloud_networking_vpc_v2" "terrform_vpc" { name="tf-vpc-01" cidrv4="10.0.0.0/16" } #subnet resource "nhncloud_networking_vpcsubnet_v2" "terrform_v-vpcsubnet-01" { name="public-subnet" vpc_id= nhncloud_networking_vpc_v2.terrform_vpc.id cidr="10.0.1.0/24" }