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-2914 GTM property fail to apply changes to the datacenter weight #451

Closed oscarsb66 closed 1 year ago

oscarsb66 commented 1 year ago

Hi there,

Terraform Version

Affected Resource(s)

Please list the resources as a list, for example:

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

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

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.

Unfortunately the output says the the resource has been modified and successfully applied.

Panic Output

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

Expected Behavior

What should have happened?

Changing the weight of a datacenter of an existing gtm property.

Actual Behavior

What actually happened?

When changing the weight of a datacenter on an existing gtm property, the terraform output states that resources has been modified and applied successfully but that's not the case. When we look in the akamai ui the property has not changed. For the moment we just do a terraform apply multiples times and check in the ui the changes are there, this is far from ideal. This happens completely randomly to any property in a given domain.

Steps to Reproduce

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

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

mimazaka commented 1 year ago

Hi @oscarsb66, We will start investigating this issue, but in mean time please provide some exemplary configuration file you have been using.

mimazaka commented 1 year ago

Does not managed to reproduced issue. Please try to reproduce issue with newest version of terraform and provide more details about configuration.

oscarsb66 commented 1 year ago

Hi here's an example of config that was failing.

---
kind: Property
spec:
  domainName: example.com
  name: partner-accounts
  failbackDelay: 300
  failoverDelay: 60
  handoutMode: normal
  scoreAggregationType: worst
  dynamicTTL: 60
  type: weighted-round-robin
  stickinessBonusConstant: 0
  stickinessBonusPercentage: 0
  trafficTargets:
  - enabled: true
    servers:
    - example
    weight: 100.0
    datacentreName: toto
  - enabled: true
    servers:
    - example
    weight: 0.0
    datacentreName: tata
  livenessTests:
  - httpHeaders:
    - name: Host
      value: example
    httpError3xx: false
    httpError4xx: true
    httpError5xx: true
    name: partner-accounts-livenessTest
    testInterval: 60
    testObject: /app/status
    testObjectPort: 443
    testObjectProtocol: HTTPS
    testTimeout: 25.0
    peerCertificateVerification: false

We haven't tried bumping the provider version yet, is that what you would advise ?

mgwoj commented 1 year ago

Hello @oscarsb66 ,

Please verify if you can reproduce this problem with the latest version of the provider.

Thanks, Michal