Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3542.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
datasource/tencentcloud_teo_origin_acl: update doc.
```
100 changes: 100 additions & 0 deletions tencentcloud/services/teo/data_source_tc_teo_origin_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,29 @@ func DataSourceTencentCloudTeoOriginAcl() *schema.Resource {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Deprecated: "Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"i_pv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Deprecated: "Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv4": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Expand Down Expand Up @@ -118,11 +136,29 @@ func DataSourceTencentCloudTeoOriginAcl() *schema.Resource {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Deprecated: "Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"i_pv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Deprecated: "Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv4": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Expand All @@ -143,11 +179,29 @@ func DataSourceTencentCloudTeoOriginAcl() *schema.Resource {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Deprecated: "Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"i_pv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Deprecated: "Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv4": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Expand All @@ -168,11 +222,29 @@ func DataSourceTencentCloudTeoOriginAcl() *schema.Resource {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Deprecated: "Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"i_pv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Deprecated: "Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv4": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Expand All @@ -193,11 +265,29 @@ func DataSourceTencentCloudTeoOriginAcl() *schema.Resource {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Deprecated: "Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"i_pv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Deprecated: "Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv4": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv4 subnet.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"ipv6": {
Type: schema.TypeSet,
Computed: true,
Description: "IPv6 subnet.",
Expand Down Expand Up @@ -277,10 +367,12 @@ func dataSourceTencentCloudTeoOriginAclRead(d *schema.ResourceData, meta interfa
if respData.OriginACLInfo.CurrentOriginACL.EntireAddresses != nil {
if respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv4 != nil {
entireAddressesMap["i_pv4"] = respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv4
entireAddressesMap["ipv4"] = respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv4
}

if respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv6 != nil {
entireAddressesMap["i_pv6"] = respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv6
entireAddressesMap["ipv6"] = respData.OriginACLInfo.CurrentOriginACL.EntireAddresses.IPv6
}

currentOriginACLMap["entire_addresses"] = []interface{}{entireAddressesMap}
Expand Down Expand Up @@ -315,10 +407,12 @@ func dataSourceTencentCloudTeoOriginAclRead(d *schema.ResourceData, meta interfa
if respData.OriginACLInfo.NextOriginACL.EntireAddresses != nil {
if respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv4 != nil {
entireAddressesMap["i_pv4"] = respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv4
entireAddressesMap["ipv4"] = respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv4
}

if respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv6 != nil {
entireAddressesMap["i_pv6"] = respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv6
entireAddressesMap["ipv6"] = respData.OriginACLInfo.NextOriginACL.EntireAddresses.IPv6
}

nextOriginACLMap["entire_addresses"] = []interface{}{entireAddressesMap}
Expand All @@ -328,10 +422,12 @@ func dataSourceTencentCloudTeoOriginAclRead(d *schema.ResourceData, meta interfa
if respData.OriginACLInfo.NextOriginACL.AddedAddresses != nil {
if respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv4 != nil {
addedAddressesMap["i_pv4"] = respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv4
addedAddressesMap["ipv4"] = respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv4
}

if respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv6 != nil {
addedAddressesMap["i_pv6"] = respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv6
addedAddressesMap["ipv6"] = respData.OriginACLInfo.NextOriginACL.AddedAddresses.IPv6
}

nextOriginACLMap["added_addresses"] = []interface{}{addedAddressesMap}
Expand All @@ -341,10 +437,12 @@ func dataSourceTencentCloudTeoOriginAclRead(d *schema.ResourceData, meta interfa
if respData.OriginACLInfo.NextOriginACL.RemovedAddresses != nil {
if respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv4 != nil {
removedAddressesMap["i_pv4"] = respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv4
removedAddressesMap["ipv4"] = respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv4
}

if respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv6 != nil {
removedAddressesMap["i_pv6"] = respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv6
removedAddressesMap["ipv6"] = respData.OriginACLInfo.NextOriginACL.RemovedAddresses.IPv6
}

nextOriginACLMap["removed_addresses"] = []interface{}{removedAddressesMap}
Expand All @@ -354,10 +452,12 @@ func dataSourceTencentCloudTeoOriginAclRead(d *schema.ResourceData, meta interfa
if respData.OriginACLInfo.NextOriginACL.NoChangeAddresses != nil {
if respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv4 != nil {
noChangeAddressesMap["i_pv4"] = respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv4
noChangeAddressesMap["ipv4"] = respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv4
}

if respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv6 != nil {
noChangeAddressesMap["i_pv6"] = respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv6
noChangeAddressesMap["ipv6"] = respData.OriginACLInfo.NextOriginACL.NoChangeAddresses.IPv6
}

nextOriginACLMap["no_change_addresses"] = []interface{}{noChangeAddressesMap}
Expand Down
30 changes: 20 additions & 10 deletions website/docs/d/teo_origin_acl.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ Note: This field may return null, which indicates a failure to obtain a valid va
Note: This field may return null, which indicates a failure to obtain a valid value.
* `entire_addresses` - IP range details.
Note: This field may return null, which indicates a failure to obtain a valid value.
* `i_pv4` - IPv4 subnet.
* `i_pv6` - IPv6 subnet.
* `i_pv4` - (**Deprecated**) Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead. IPv4 subnet.
* `i_pv6` - (**Deprecated**) Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead. IPv6 subnet.
* `ipv4` - IPv4 subnet.
* `ipv6` - IPv6 subnet.
* `is_planed` - This parameter is used to record whether "I've upgraded to the lastest version" is completed before the origin ACLs version is effective. valid values:.
- true: specifies that the version is effective and the update to the latest version is confirmed.
- false: when the version takes effect, the confirmation of updating to the latest origin ACLs are not completed. The IP range is forcibly updated to the latest version in the backend. When this parameter returns false, please confirm in time whether your origin server firewall configuration has been updated to the latest version to avoid origin-pull failure.
Expand All @@ -52,18 +54,26 @@ Note: This field may return null, which indicates a failure to obtain a valid va
* `next_origin_acl` - When the origin ACLs are updated, this field will be returned with the next version's origin IP range to take effect, including a comparison with the current origin IP range. This field is empty if not updated or origin protection is not enabled.
Note: This field may return null, which indicates a failure to obtain a valid value.
* `added_addresses` - The latest origin IP range newly-added compared with the origin IP range in CurrentOrginACL.
* `i_pv4` - IPv4 subnet.
* `i_pv6` - IPv6 subnet.
* `i_pv4` - (**Deprecated**) Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead. IPv4 subnet.
* `i_pv6` - (**Deprecated**) Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead. IPv6 subnet.
* `ipv4` - IPv4 subnet.
* `ipv6` - IPv6 subnet.
* `entire_addresses` - IP range details.
* `i_pv4` - IPv4 subnet.
* `i_pv6` - IPv6 subnet.
* `i_pv4` - (**Deprecated**) Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead. IPv4 subnet.
* `i_pv6` - (**Deprecated**) Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead. IPv6 subnet.
* `ipv4` - IPv4 subnet.
* `ipv6` - IPv6 subnet.
* `no_change_addresses` - The latest origin IP range is unchanged compared with the origin IP range in CurrentOrginACL.
* `i_pv4` - IPv4 subnet.
* `i_pv6` - IPv6 subnet.
* `i_pv4` - (**Deprecated**) Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead. IPv4 subnet.
* `i_pv6` - (**Deprecated**) Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead. IPv6 subnet.
* `ipv4` - IPv4 subnet.
* `ipv6` - IPv6 subnet.
* `planned_active_time` - Version effective time, which adopts UTC+8 and follows the date and time format of the ISO 8601 standard.
* `removed_addresses` - The latest origin IP range deleted compared with the origin IP range in CurrentOrginACL.
* `i_pv4` - IPv4 subnet.
* `i_pv6` - IPv6 subnet.
* `i_pv4` - (**Deprecated**) Field `i_pv4` has been deprecated from version 1.82.27. Use new field `ipv4` instead. IPv4 subnet.
* `i_pv6` - (**Deprecated**) Field `i_pv6` has been deprecated from version 1.82.27. Use new field `ipv6` instead. IPv6 subnet.
* `ipv4` - IPv4 subnet.
* `ipv6` - IPv6 subnet.
* `version` - Version number.
* `status` - Origin protection status. Vaild values:
- online: in effect;
Expand Down
Loading