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

Cannot update Project folder_id #112

Closed
geekflyer opened this issue Mar 20, 2019 · 3 comments
Closed

Cannot update Project folder_id #112

geekflyer opened this issue Mar 20, 2019 · 3 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@geekflyer
Copy link

geekflyer commented Mar 20, 2019

Somehow pulumi fails while attempting to move a project into a folder.
Versions:
pulumi CLI: v0.17.1
pulumi-gcp: 0.17.1
Runtime: nodejs

Error message:

   * updating urn:pulumi:gcp-project-redacted::gcp-project-redacted::gcp:organizations/project:Project::redacted: 'org_id' and 'folder_id' cannot be both set.

Reproduction:

  1. Step 1: Pulumi up the following program which creates a project directly underneath an org:
import * as gcp from '@pulumi/gcp';

const GCP_ORG_ID = 'foo';
const GCP_BILLING_ACCOUNT_ID = 'bar';

new gcp.organizations.Project(
  'some-project-123',
  {
    name: 'some-project-123',
    projectId: 'some-project-123',
    billingAccount: GCP_BILLING_ACCOUNT_ID,
    orgId: GCP_ORG_ID
  }
);
  1. Step 2: Create a GCP Folder resource and attempt to move the project underneath that folder:
import * as gcp from '@pulumi/gcp';

const GCP_ORG_ID = 'foo';
const GCP_BILLING_ACCOUNT_ID = 'bar';

// this new folder is supposed to contain all prod relevant subprojects underneath.
export const prodFolder = new gcp.organizations.Folder('prod-folder', {
  displayName: 'prod',
  parent: `organizations/${GCP_ORG_ID}`
});

new gcp.organizations.Project(
  'some-project-123',
  {
    name: 'some-project-123',
    projectId: 'some-project-123',
    billingAccount: GCP_BILLING_ACCOUNT_ID,
    folderId: prodFolder.id
  }
);

The error mentioned above will occur. I couldn't really find a good workaround. Even when I move the project underneath the folder manually via the UI pulumi continues to show that error.

@lukehoban
Copy link
Contributor

@swgillespie @jen20 This sounds like it could be a core engine issue around applying old inputs that are no longer part of the new inputs? pulumi/pulumi-terraform#305 was a recent fix somewhat related to this - though in that case it was related to there being a default.

@geekflyer
Copy link
Author

fyi what's the status on this? I just tried this with pulumi CLI v0.17.22 and

    "@pulumi/gcp": "0.18.12",
    "@pulumi/pulumi": "0.17.22",

but the issue persists.

@lukehoban lukehoban assigned stack72 and unassigned jen20 Jan 23, 2020
@mikhailshilkov mikhailshilkov added the kind/bug Some behavior is incorrect or out of spec label Jan 30, 2023
@mikhailshilkov mikhailshilkov added the resolution/fixed This issue was fixed label Oct 27, 2023
@mikhailshilkov mikhailshilkov self-assigned this Oct 27, 2023
@mikhailshilkov
Copy link
Member

I believe this has been fixed upstream in hashicorp/terraform-provider-google#7197

I gave it a quick test locally and it seems to work fine now.

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/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

5 participants