기존 로컬 자료 복사
This commit is contained in:
		
							
								
								
									
										9
									
								
								modules/vpc/main.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								modules/vpc/main.tf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
resource "aws_vpc" "vpcHq" {
 | 
			
		||||
    # cidr_block       = "10.3.0.0/16"
 | 
			
		||||
    cidr_block       = var.cidr_block
 | 
			
		||||
    // instance_tenancy = "default"
 | 
			
		||||
 | 
			
		||||
    tags = {
 | 
			
		||||
    Name = "test"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								modules/vpc/outputs.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								modules/vpc/outputs.tf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
//modules-vpc-output
 | 
			
		||||
output "vpc_hq_id" {
 | 
			
		||||
  description = "The name of vpc hq id"
 | 
			
		||||
  value = aws_vpc.vpcHq.id
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										29
									
								
								modules/vpc/valiables.tf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								modules/vpc/valiables.tf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,29 @@
 | 
			
		||||
variable "cidr_block" {
 | 
			
		||||
    description = "value"
 | 
			
		||||
    type = string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// reference | https://github.com/davidcsi/terraform/blob/master/healthchecks/main.tf
 | 
			
		||||
variable "subnet-az-list" {
 | 
			
		||||
    description = "Subnet available zone & cidr"
 | 
			
		||||
    type = map(map(string))
 | 
			
		||||
    default = {
 | 
			
		||||
        "zone-a" = {
 | 
			
		||||
            name = "ap-northeast-2a"
 | 
			
		||||
            cidr = "10.3.1.0/24"
 | 
			
		||||
        }
 | 
			
		||||
        "zone-b" = {
 | 
			
		||||
            name = "ap-northeast-2b"
 | 
			
		||||
            cidr = "10.3.2.0/24"
 | 
			
		||||
        }
 | 
			
		||||
        "zone-c" = {
 | 
			
		||||
            name = "ap-northeast-2c"
 | 
			
		||||
            cidr = "10.3.3.0/24"
 | 
			
		||||
        }
 | 
			
		||||
        "zone-d" = {
 | 
			
		||||
            name = "ap-northeast-2d"
 | 
			
		||||
            cidr = "10.3.4.0/24"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user