Skip to content

zql-tqy/terraform-alicloud-private-zone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alicloud Private Zone Terraform Module terraform-alicloud-private-zone

Terraform module which creates Private Zone resources on Alibaba Cloud.

These types of resources are supported:

Root module calls these modules which can also be used separately to create independent resources:

  • record_list means multiple record

NOTE:

  • Domain (record) need follow RFC.

Usage

You can use this in your terraform template with the following steps.

  1. Adding a module resource to your template, e.g. main.tf

     module "pvtz" {
       source              = "terraform-alicloud-modules/private-zone/alicloud"
       domain_name           = "pvtz.com"
       vpc_id_list           = ["${module.vpc.vpc_id}"]
       need_attachment         = true
       record_list           = [
         {
           name          = "www"
           type          = "A"
           ttl           = 600
           value           = "223.5.5.5"
           priority        = 1
         },
         {
           name          = "www"
           type          = "MX"
           ttl           = 600
           value           = "mx.aliyun.com"
           priority        = 1
         },
         {
           name          = "cname"
           type          = "CNAME"
           ttl           = 600
           value           = "mx.aliyun.com"
           priority        = 1
         }
       ]
     }
    
     module "vpc" {
       source              = "alibaba/vpc/alicloud"
       vpc_name            = "testVpc"
       vpc_cidr            = "192.168.0.0/16"
       vpc_description         = "pvtz test vpc"
     }
    
  2. Setting values for the following variables through environment variables:

    • ALICLOUD_ACCESS_KEY
    • ALICLOUD_SECRET_KEY
    • ALICLOUD_REGION

Inputs

Name Description Type Default Required
domain_name domain name which you want to add list - yes
record_list record list list - yes
vpc_id_list the vpc id list what you want to attached list - no
need_attachment attachment switch bool false no

Outputs

Name Description
this_domain_name domain name
this_records record info list

Authors

Created and maintained by Zeng Yichen(@microdustor [email protected])

Reference

About

Terraform module which create private zones and records on Alibaba Cloud

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%