Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
infrastructure
提交
1d0c13b9
I
infrastructure
项目概览
openeuler
/
infrastructure
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
infrastructure
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1d0c13b9
编写于
9月 03, 2019
作者:
F
freesky-edward
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add dns records support
上级
6b093ca8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
98 addition
and
0 deletion
+98
-0
environment/huaweicloud/dns/dns_template.tf
environment/huaweicloud/dns/dns_template.tf
+28
-0
environment/huaweicloud/dns/dns_vars.tf
environment/huaweicloud/dns/dns_vars.tf
+34
-0
environment/huaweicloud/resources.tf
environment/huaweicloud/resources.tf
+36
-0
未找到文件。
environment/huaweicloud/dns/dns_template.tf
0 → 100644
浏览文件 @
1d0c13b9
resource
"huaweicloud_dns_ptrrecord_v2"
"this"
{
count
=
"
${
length
(
var
.
ptrs
)
}
"
name
=
"
${
lookup
(
var
.
ptrs
[
count
.
index
],
"domain"
,
null
)
}
"
description
=
"
${
lookup
(
var
.
ptrs
[
count
.
index
],
"description"
,
"ptr"
)
}
"
floatingip_id
=
"
${
lookup
(
var
.
ptrs
[
count
.
index
],
"ip"
,
null
)
}
"
ttl
=
"
${
lookup
(
var
.
ptrs
[
count
.
index
],
"ttl"
,
3000
)
}
"
}
resource
"huaweicloud_dns_zone_v2"
"this"
{
name
=
"
${
var
.
domain
}
"
email
=
"
${
var
.
email
}
"
description
=
"
${
var
.
description
}
"
ttl
=
"
${
var
.
ttl
}
"
zone_type
=
"
${
var
.
type
}
"
}
resource
"huaweicloud_dns_recordset_v2"
"this"
{
count
=
"
${
length
(
var
.
records
)
}
"
zone_id
=
"
${
huaweicloud_dns_zone_v2
.
this
.
id
}
"
name
=
"
${
lookup
(
var
.
records
[
count
.
index
],
"domain"
,
null
)
}
"
description
=
"
${
lookup
(
var
.
records
[
count
.
index
],
"description"
,
""
)
}
"
ttl
=
"
${
lookup
(
var
.
records
[
count
.
index
],
"ttl"
,
3000
)
}
"
type
=
"
${
lookup
(
var
.
records
[
count
.
index
],
"type"
,
null
)
}
"
records
=
[
"
${
lookup
(
var
.
records
[
count
.
index
],
"value"
,
null
)
}
"
]
}
environment/huaweicloud/dns/dns_vars.tf
0 → 100644
浏览文件 @
1d0c13b9
variable
"domain"
{
description
=
"The domain name of this dns"
}
variable
"email"
{
description
=
"The manager's email"
}
variable
"ttl"
{
description
=
"The ttl time"
default
=
3000
}
variable
"type"
{
description
=
"The DNS type, the value would be public or private"
default
=
"public"
}
variable
"description"
{
description
=
"The dns description string"
default
=
""
}
variable
"records"
{
type
=
list
(
map
(
string
))
description
=
"List of each dns records"
default
=
[]
}
variable
"ptrs"
{
type
=
list
(
map
(
string
))
description
=
"List of ptr records"
default
=
[]
}
environment/huaweicloud/resources.tf
浏览文件 @
1d0c13b9
...
...
@@ -122,4 +122,40 @@ module "nat" {
]
}
module
"dns"
{
source
=
"./dns"
domain
=
"openeuler.org"
email
=
"freesky.edward@gmail.com"
records
=
[
{
domain
=
"mail"
type
=
"A"
value
=
"
${
split
(
","
,
module
.
internet
.
this_eip_ids
)[
1
]
}
"
},
{
domain
=
"mailweb"
type
=
"A"
value
=
"
${
split
(
","
,
module
.
internet
.
this_eip_ids
)[
2
]
}
"
},
{
domain
=
"@"
type
=
"MX"
value
=
"mail.openeuler.org"
},
{
domain
=
"@"
type
=
"TXT"
value
=
"v=spf1 a mx ip4:
${
split
(
","
,
module
.
internet
.
this_eip_ids
)[
0
]
}
~all"
}
]
ptrs
=
[
{
domain
=
"openeuler.org"
ip
=
"
${
split
(
","
,
module
.
internet
.
this_eip_ids
)[
0
]
}
"
}
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录