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-3799] Error while updating rule template value and activating it using terraform #543

Open
SinghPavan opened this issue Apr 19, 2024 · 5 comments

Comments

@SinghPavan
Copy link

SinghPavan commented Apr 19, 2024

Hi there,

We are using terraform to create property, but today when we try to update certain value like caching time and other vales we are getting below error:

Terraform Version

Terraform v1.8.1
on linux_amd64
akamai/akamai v6.0.0...

Affected Resource(s)

Please list the resources as a list, for example:

  • akamai_property
  • akamai_property_activation
  • akamai_property_rules_template

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

Terraform Configuration Files

data "akamai_property_rules_template" "rules" {
  template_file = abspath("${path.root}/templates/common-snippets/main.json")
variables {
    name  = "caching_ttl"
    value = var.caching_ttl
  }
}
resource "akamai_property" "akamai_property_provisioning" {
  name = "example_iac"
  #Product Identifier (Ion), This remain fixed for all the groups under Unilever account
  
  #Group ID, This will change per groups                          
  group_id = "121232"
  #Contract ID, will remain fixed for all the groups      
  contract_id = "12312312"

  hostnames {
      cname_from             = "example.com"
      cname_to 	             = "example.com.edgekey.net"
      cert_provisioning_type = "DEFAULT"
    }
  rule_format = "latest"
  rules       = data.akamai_property_rules_template.rules.json

}

resource "akamai_property_activation" "pm_activation" {
  property_id                    = akamai_property.akamai_property_provisioning.id
  version                        = akamai_property.akamai_property_provisioning.latest_version
  network                        = staging
  auto_acknowledge_rule_warnings = true
}

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

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

Should update the rule template and property and activate it.

Actual Behavior

What actually happened?
│ Error: Provider produced inconsistent final plan

│ When expanding the plan for
│ module.property.akamai_property.akamai_property_provisioning to include new
│ values learned so far during apply, provider
│ "registry.terraform.io/akamai/akamai" produced an invalid new value for
│ .staging_version: was known, but now unknown.

│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

Steps to Reproduce

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

  1. Create the code for rule template, property and activation
  2. Add a variable that will pass in the list of children to be included
  3. terraform apply

Important Factoids

No

References

No

@SinghPavan SinghPavan changed the title Error while updating value using terraform Error while updating rule template value and activating it using terraform Apr 19, 2024
@PawelSnoch PawelSnoch changed the title Error while updating rule template value and activating it using terraform [DXE-3799] Error while updating rule template value and activating it using terraform Apr 23, 2024
@PawelSnoch
Copy link

Hello @SinghPavan,

Thank you for reporting this ticket.
We try to reproduce your issue. Could you please add more details about your updates, especially if there were any changes for
resource "akamai_property_activation" "pm_activation"?

Thanks,
Pawel

@SinghPavan
Copy link
Author

SinghPavan commented Apr 23, 2024

Hello PawelSnoch,

I connected with akamai partner support and they told me to change the version to 5.4.0 from 6.0.0. I reverted akamai version for terraform to 5.4.0 and it worked.

Are you able to replicate the issue?

Thank you.

@SinghPavan
Copy link
Author

But the revert is temporary to recover from outage.

@PawelSnoch
Copy link

Hello @SinghPavan ,

we are unable to reproduce the same issue, but we have started an investigation. It would be great if you could check what else was modified - you mentioned about caching time and other vales.

Thank you,
Pawel

@SinghPavan
Copy link
Author

SinghPavan commented Apr 24, 2024

Hi @PawelSnoch

There was no change in actual terraform code. We just tried to update certain value like ttl and others value (Like hostname) through existing tfvars file and we have done this type of changes earlier also and it had succeeded. But this time we stuck with the error mentioned above.

Below is the debug output for the error,

2024-04-19T18:44:11.276+0530 [DEBUG] State storage *remote.State declined to persist a state snapshot
2024-04-19T18:44:11.330+0530 [WARN]  Provider "registry.terraform.io/akamai/akamai" produced an invalid plan for module.property.akamai_property.akamai_property_provisioning, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .rules: planned value cty.StringVal("SOME COMMENT")
2024-04-19T18:44:11.336+0530 [ERROR] vertex "module.property.akamai_property.akamai_property_provisioning" error: Provider produced inconsistent final plan
2024-04-19T18:44:11.336+0530 [ERROR] vertex "module.property.akamai_property.akamai_property_provisioning" error: Provider produced inconsistent final plan
2024-04-19T18:44:11.336+0530 [ERROR] vertex "module.property.akamai_property.akamai_property_provisioning" error: Provider produced inconsistent final plan
2024-04-19T18:44:11.336+0530 [DEBUG] states/remote: state read serial is: 13; serial is: 13
2024-04-19T18:44:11.337+0530 [DEBUG] states/remote: state read lineage is: ca3e08df-a1ad-f092-e0eb-2dcb75fc0be2; lineage is: ca3e08df-a1ad-f092-e0eb-2dcb75fc0be2
2024-04-19T18:44:11.831+0530 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-04-19T18:44:11.859+0530 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/akamai/akamai/6.0.0/windows_amd64/terraform-provider-akamai_v6.0.0.exe pid=9160
2024-04-19T18:44:11.859+0530 [DEBUG] provider: plugin exited

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants