akamai / terraform-provider-akamai

Terraform Akamai provider
https://www.terraform.io/docs/providers/akamai/
Mozilla Public License 2.0
109 stars 96 forks source link

DXE-4164 Unable to avoid akamai_property_include recreation after successful import #575

Open estif95 opened 2 months ago

estif95 commented 2 months ago

The documentation about akamai_property_include resource indicates the argument "product_id" is required. After successfully import the resource we are not able to manage the resource without recreating it. The argument "product_id" is not set during import phase but it is required, so we can't avoid the recreation of the include after successfully imported. Are we missing something?

Terraform and Akamai Terraform Provider Versions

Terraform v1.5.7 on linux_amd64
+ provider registry.terraform.io/akamai/akamai v6.3.0

Affected Resource(s)

Terraform Configuration Files

N/A

Debug Output

  # module.include.akamai_property_include.main must be replaced
-/+ resource "akamai_property_include" "main" {
      ~ id                        = "xxxxxxx" -> (known after apply)
      ~ latest_version     = 3 -> (known after apply)
      + product_id         = "prd_Fresca" # forces replacement

Panic Output

N/A

Expected Behavior

After importing the akamai_property_include we should be able to manage the resource via Terraform without recreating it.

Actual Behavior

After importing the akamai_property_include it must be recreated to set product_id attribute.

Steps to Reproduce

  1. create on Property Manager a new include on ION Standard Product
  2. import the new created resource via terraform import 'ctr_xxxx:grp_xxxxx:inc_xxxxxx'
  3. run terraform plan

Important Factoids

N/A

References

N/A

lsadlon commented 2 months ago

Hi @estif95,

Thanks for reporting this issue. I was able to reproduce it and we will investigate potential solution and go back to you. For now you can try to drop product_id from you configuration as it is not needed after import.

BR, Lukasz