Open deepakjd2004 opened 10 months ago
Hey @deepakjd2004. Thanks for letting us know. It would be really helpful if you could elaborate on step 2 so we can reproduce the bug.
This sounds like an upstream bug, but I don't see an associated upstream issue. I think the next step is to recreate the sample program in TF and confirm that it still repros.
Hey @iwahbe - Thanks for looking into it. I don't think it is upstream tf provider bug because i cannot replicate same behavior using terraform. In the step 2 make changes to default_rules.json i.e. the file that get passed to akamai.Property.rules. Make any change to default_rules.json(change any behavior, for e.g. update default origin.hostname to some other name, or update ttl or anything that does not cause schema validation issue, see below) so that pulumi sense it as a change and try to create a new version.
"rules": {
"name": "default",
"behaviors": [
{
"name": "origin",
"options": {
"cacheKeyHostname": "ORIGIN_HOSTNAME",
"compress": true,
"enableTrueClientIp": false,
"forwardHostHeader": "REQUEST_HOST_HEADER",
**"hostname": "somevalue.com",**
"httpPort": 80,
"httpsPort": 443,
"originCertificate": "",
"originSni": true,
"originType": "CUSTOMER",
"ports": "",
"verificationMode": "PLATFORM_SETTINGS"
}
I'm currently experiencing the same issue. I've got two properties, for our dev/test environments. They were pointing to some URL to begin with, then I changed the hostname of the dev environment by adding a -v2
suffix as I intend to migrate a service without having any downtime.
Later on I changed the test environment too. Now, everytime I update the stack, both of these properties keep alternating between the first hostname and the new one, even if I haven't changed the input.
Now, I could've worked around this if they were both rotating on the same two values, but they have opposing values, so I can never point to the same hostname on both services
What happened?
When updating hostname of a akamai property managed by pulumi - If we edit the hostnames of a property, the rules are reverted to the rules of v1. If we edit the rules of a property, the hostnames are reverted to the hostnames of v1.
Example
1) Create new property using pulumi python package 2) Do some changes in rules.json so that v2 is created 3) Add new hostname and execute pulumi 4) You would see that rules.json reverted to v1 and v2 changes are wiped off, new hostname added.. 5) Now again run pulumi up command without making any changes, this time v2 changes would be back but hosname added in step 3 is gone..
Sample code
Output of
pulumi about
pulumi about CLI Version 3.99.0 Go Version go1.21.5 Go Compiler gc
Plugins NAME VERSION akamai 6.3.1 python unknown
Host OS darwin Version 13.6 Arch x86_64
This project is written in python: executable='/Library/Frameworks/Python.framework/Versions/3.10/bin/python3' version='3.10.8'
Current Stack: qa
TYPE URN pulumi:pulumi:Stack urn:pulumi:qa::demo-22Dec2023::pulumi:pulumi:Stack::demo-22Dec2023-qa pulumi:providers:akamai urn:pulumi:qa::demo-22Dec2023::pulumi:providers:akamai::default_6_3_1 akamai:index/edgeHostName:EdgeHostName urn:pulumi:qa::demo-22Dec2023::akamai:index/edgeHostName:EdgeHostName::demo-pulumi22Dec2023 akamai:index/cpCode:CpCode urn:pulumi:qa::demo-22Dec2023::akamai:index/cpCode:CpCode::pulumi-demo22Dec2023 akamai:index/property:Property urn:pulumi:qa::demo-22Dec2023::akamai:index/property:Property::pulumiPropertyDemo22Dec2023 akamai:index/propertyActivation:PropertyActivation urn:pulumi:qa::demo-22Dec2023::akamai:index/propertyActivation:PropertyActivation::pulumiStaging
Found no pending operations associated with qa
Backend Name xxxxxxx URL file://~ User xxxxx Organizations Token type personal
Dependencies: NAME VERSION pip 23.3.2 pulumi-akamai 6.3.1 setuptools 69.0.2 wheel 0.42.0
Pulumi locates its logs in /var/folders/qj/tpkbgz8d2vxdqhyw9cmldb280000gp/T/ by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).