Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXE-3092 akamai_networklist_activations does not support terraform import #469

Open
gsilvapt opened this issue Sep 5, 2023 · 0 comments

Comments

@gsilvapt
Copy link

gsilvapt commented Sep 5, 2023

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v1.5.6
on darwin_arm64
+ provider registry.terraform.io/akamai/akamai v5.2.0

Affected Resource(s)

  • akamai_networklist_activations

Terraform Configuration Files

Not relevant to the issue as I'm following the guide here to import a list into the state.

Debug Output

After running `terraform import "akamai_networklist_activations.activation["List Name"] 0000000":

akamai_networklist_activations.activation["List Name"]: Importing from ID "0000000"...
╷
│ Error: resource akamai_networklist_activations doesn't support import

Panic Output

N/A

Expected Behavior

When importing existing NetworkLists from the account into Terraform, just as with akamai_networklist_network_list, it is desired to be able to import the corresponding activations in the Terraform state. As things are, we are able to import the lists into the state with terraform import akamai_networklist_network_list[key] [uniqueid] but the plan will always create the corresponding activations. This can lead to undesired activations really, and the activation should only be triggered when there is a change in the list.

Actual Behavior

To import existing NetworkLists into Terraform, we have to recreate the activations in the state with terraform apply, as it 's not possible to leverage terraform import to get them into the sate, meaning we will be making uncontrolled API calls under the hood which can cause undesired changes in the platform.

Steps to Reproduce

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

  1. Re-create an existing list with Terraform code. I used a custom script to fetch data from the API but choose an isolated case. Copy the values into the resource block.
  2. Import the list to your state with terraform import akamai_networklist_network_list <uniqueid>, where uniqueid is obtained in the API.
  3. Notice your terraform plan will still suggest to create the activation.
  4. If you get the last activation data from the API, you cannot import it into state, and the plan will suggest to create it.
  5. If you run terraform apply, there could be calls changing your list state underneath, leading to undesired changes.

Important Factoids

N/A

References

N/A

@dawiddzhafarov dawiddzhafarov changed the title akamai_networklist_activations does not support terraform import DXE-3092 akamai_networklist_activations does not support terraform import Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants