aliyun / terraform-provider-alicloud

Terraform AliCloud provider
https://www.terraform.io/docs/providers/alicloud/
Mozilla Public License 2.0
585 stars 549 forks source link

How can I get the value of TXT record before I create the domain with alicloud_alidns_domain resource #6649

Open ik8svip opened 10 months ago

ik8svip commented 10 months ago

Terraform Version

$ terraform version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/aliyun/alicloud v1.212.0

Affected Resource(s)

Please list the resources as a list, for example:

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

# resource "alicloud_alidns_domain" "domain" {
#   resource_group_id = var.resource_group_id
#   group_id          = alicloud_alidns_domain_group.group.id
#   domain_name       = var.vpc_domain
#   # lang              = ""
#   # remark            = ""
#   tags              = var.tags
# }

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output


│ Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_alidns_domain.go:95: Resource alicloud_alidns_domain AddDomain Failed!!! [SDK alibaba-cloud-sdk-go ERROR]:
│ SDK.ServerError
│ ErrorCode: Txt.Record.Expired
│ Recommend: https://api.aliyun.com/troubleshoot?q=Txt.Record.Expired&product=Alidns&requestId=3FEAC037-306A-5EF4-AA3F-02A08202DBA1
│ RequestId: 3FEAC037-306A-5EF4-AA3F-02A08202DBA1
│ Message: The TXT record is expired. Generate a new TXT record.
│ RespHeaders: map[Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[*] Connection:[keep-alive] Content-Length:[310] Content-Type:[application/json;charset=utf-8] Date:[Sat, 11 Nov 2023 05:49:19 GMT] Keep-Alive:[timeout=25] X-Acs-Request-Id:[3FEAC037-306A-5EF4-AA3F-02A08202DBA1] X-Acs-Trace-Id:[157afb32ca20cea35686fa8a2a734803]]
│ 

Expected Behavior

What should have happened?

Actual Behavior

What actually happened?

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

ik8svip commented 10 months ago

FYI @xiaozhu36