aliyun / terraform-provider-alicloud

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

alicloud_cr_endpoint_acl_policy creation failing with: produced an unexpected new value: Root resource was present, but now absent. #4219

Open maximbruy opened 2 years ago

maximbruy commented 2 years ago

Terraform Version

1.0.11

Affected Resource(s)

resource "alicloud_cr_endpoint_acl_policy"

Terraform Configuration Files

resource "alicloud_cr_ee_instance" "cr_instance" {
  payment_type      = "Subscription"
  period            = 1
  renew_period      = 0
  renewal_status    = "ManualRenewal"
  instance_type     = "Standard"
  instance_name     = ""
  password          = "password"
  custom_oss_bucket = "mybucket"
}

data "alicloud_cr_endpoint_acl_service" "default" {
  endpoint_type = "internet"
  enable        = true
  instance_id   = alicloud_cr_ee_instance.cr_instance[0].id
  module_name   = "Registry"
}
resource "alicloud_cr_endpoint_acl_policy" "default" {
  instance_id   = alicloud_cr_ee_instance.cr_instance[0].id
  entry         = "0.0.0.0/0"
  description   = "Ingress access"
  module_name   = "Registry"
  endpoint_type = "internet"
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

container registry acl with "0.0.0.0/0" cidr is created:

  + resource "alicloud_cr_endpoint_acl_policy" "default" {
      + description   = "Ingress access"
      + endpoint_type = "internet"
      + entry         = "0.0.0.0/0"
      + id            = (known after apply)
      + instance_id   = "cri-jtzg6543e20nXXXX"
      + module_name   = "Registry"
    }

Actual Behavior

When applying changes to module.mycr.alicloud_cr_endpoint_acl_policy.default, provider "provider[\"registry.terraform.io/aliyun/alicloud\"].eu-central-1" produced an unexpected new value: Root resource was present, but now absent.

Steps to Reproduce

  1. terraform apply

Important Factoids

running on alicloud

References

N/A

maximbruy commented 2 years ago

found workaround for this issue. you can split 0.0.0.0/0 to 0.0.0.0/1 and 128.0.0.0/1 ranges then ali successfully apply settings. so it is looks like as alicloud issue