akamai / terraform-provider-akamai

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

DXE-3507 Document how to import a property #521

Open stigok opened 10 months ago

stigok commented 10 months ago

Affected Resource(s)

Please list the resources as a list, for example:

Instructions on how to import a resource of type akamai_property using the terraform import command is not documented on the property resource page https://techdocs.akamai.com/terraform/docs/pm-rc-property.

lsadlon commented 10 months ago

Hi @stigok

Thank you for raising this issue. We will investigate it and get back to you.

BR, Lukasz

lkowalsk-akamai-com commented 10 months ago

Hi @stigok please check if this part of the documentation helps you: https://techdocs.akamai.com/terraform/docs/set-up-property-provisioning#import-a-property This shows much easier way to import the property using cli-terraform to do the export of a given property.

stigok commented 10 months ago

Yes, it helps, but it is not located where one expects to find that information. It would be ideal to keep the import instructions on a specific resource's documentation page, as this is what one expects when working with almost all other Terraform providers.

estif95 commented 3 months ago

It would be really usefull! As a workarround we are using the documentation of the provider version 3.4.0. that is still working in the latest version of the provider: https://registry.terraform.io/providers/akamai/akamai/3.4.0/docs/resources/property#import

@lkowalsk-akamai-com the CLI can be usefull in some cases, specially when you don't have the Terraform configuration writen and want a massive export, but in our case, we are using Terraform modules to create the properties and we are importing old properties to our modules. I can modify the script that the CLI generates to match the way we are working, but I think it should be more easier if only documented as we expect on a provider.

The import block feature of Terraform is so usefull https://developer.hashicorp.com/terraform/language/import#syntax and it makes imports GitOps on every Terraform CICD. This allows teams to collaborate on "imports" tasks and follow what happens in a specific resource since it's creation (even if the resource was originally imported or created by terraform).

Thanks, Esteve