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

error: internal: Pulumi property 'terraformLabels' mapped non-uniquely to Terraform attribute 'terraform_labels' (duplicates Pulumi key 'pulumiLabels') #1809

Closed
superjose opened this issue Mar 10, 2024 · 6 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue

Comments

@superjose
Copy link

What happened?

Hi everyone 🤗. Thank you for making such an incredible IaaC library such as Pulumi!

I've encountered a slight hiccup when trying to destroy Cloud Run using Pulumi and the Go SDK.

Pulumi returns with:

error: internal: Pulumi property 'terraformLabels' mapped non-uniquely to Terraform attribute 'terraform_labels' (duplicates Pulumi key 'pulumiLabels')

The project is able to update as usual without any problems!

Asking Pulumi AI yields me the following response:

The error you're encountering is related to an internal mapping issue between Pulumi's representation of a resource's labels and the underlying Terraform provider's representation. This is generally an issue with the Pulumi provider for GCP, which should ideally handle any mapping of properties internally without causing such conflicts.

To address this issue, make sure that you are using the latest version of the Pulumi GCP provider, as this might be a bug that has been fixed in a newer version. If updating doesn't resolve the issue, you can try renaming any labels you have specified that could be conflicting with internal property names, avoiding names like pulumiLabels or terraformLabels.

Example

https://github.com/superjose/deploy-to-cloud-run-go

A series of GCP permissions need to be applied (I'm currently trying to finish a post and updating the Readme)

pulumi up

Then:

pulumi destroy

Output of pulumi about

LI          
Version      3.108.1
Go Version   go1.22.0
Go Compiler  gc

Plugins
NAME    VERSION
docker  3.6.1
gcp     7.13.0
go      unknown

Host     
OS       darwin
Version  14.4
Arch     arm64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.22.0 darwin/arm64'

Current Stack: superjose/deploy-to-cloud-run-go/dev

TYPE                          URN
pulumi:pulumi:Stack           urn:pulumi:dev::deploy-to-cloud-run-go::pulumi:pulumi:Stack::deploy-to-cloud-run-go-dev
pulumi:providers:gcp          urn:pulumi:dev::deploy-to-cloud-run-go::pulumi:providers:gcp::default
gcp:projects/service:Service  urn:pulumi:dev::deploy-to-cloud-run-go::gcp:projects/service:Service::artifact-registry-api
gcp:projects/service:Service  urn:pulumi:dev::deploy-to-cloud-run-go::gcp:projects/service:Service::cloud-run-admin-service
gcp:cloudrun/service:Service  urn:pulumi:dev::deploy-to-cloud-run-go::gcp:cloudrun/service:Service::cloud-run-service


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/superjose
User           superjose
Organizations  superjose
Token type     personal

Dependencies:
NAME                                    VERSION
github.com/joho/godotenv                v1.5.1
github.com/pulumi/pulumi-docker/sdk/v3  v3.6.1
github.com/pulumi/pulumi-gcp/sdk/v7     v7.13.0
github.com/pulumi/pulumi/sdk/v3         v3.108.1

Pulumi locates its logs in /var/folders/h_/hyh6zzw94sbdbnk6sfkgfy7c0000gn/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).

@superjose superjose added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Mar 10, 2024
@developer239
Copy link

developer239 commented Mar 10, 2024

I ran into the same issue yesterday. One thing that I didn't think of yesterday is to make sure that Terraform is up to date (or in sync with whatever Pulumi expects wherever you can find that 🙃)

Other than that I closed my issue and decide to use Terraform instead: #1804

@iwahbe
Copy link
Member

iwahbe commented Mar 13, 2024

Hi @superjose. I'm sorry you're hitting this. This is a know bug (duplicate of #1794) and will be fixed in the next pulumi-gcp release.

The bug fix is pulumi/pulumi-terraform-bridge#1757, which I expect to land later today. As soon as the goes in, we will cut a patch release of pulumi-gcp to resolve the issue.

@iwahbe iwahbe added resolution/duplicate This issue is a duplicate of another issue and removed needs-triage Needs attention from the triage team labels Mar 13, 2024
@iwahbe iwahbe self-assigned this Mar 13, 2024
@iwahbe iwahbe closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@superjose
Copy link
Author

Hi @superjose. I'm sorry you're hitting this. This is a know bug (duplicate of #1794) and will be fixed in the next pulumi-gcp release.

The bug fix is pulumi/pulumi-terraform-bridge#1757, which I expect to land later today. As soon as the goes in, we will cut a patch release of pulumi-gcp to resolve the issue.

Oh I apologize for creating this duplicated issue!!!!

Thank you for the response!!

@gchristov
Copy link

Heya! I've literally just spent a few hours investigating this issue until I stumbled upon the repo here 🤦

For me pulumi preview seems to be working fine locally with version 3.109.0 but I get the above error on GitHub Actions using pulumi/actions@v5 and the same 3.109.0. Not really sure why as I'm running the same version of Pulumi in both places.

@iwahbe Any suggestions? Also, will the fix be available for the GitHub action too?

@gchristov
Copy link

Btw I've managed to fix the issue by downgrading the GCP provider to version 7.11.2. For anyone else hitting this, you can downgrade the provider for a specific resource using.

options:
    version: 7.11.2

I'm guessing the Pulumi version isn't tied to the one for the GCP provider? If so, what is the recommended way to have stable builds?

My build was working last week and it unexpectedly broke today and caused me to waste a few hours trying to figure out why 😞

@iwahbe
Copy link
Member

iwahbe commented Mar 14, 2024

The version of pulumi and the version of pulumi-gcp float independently. You can work around this by downgrading to pulumi v7.11.2 as you have found out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants