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

Added/removed accessConfigs after inital instance creation do not get recognized #1252

Closed
tferazzi opened this issue Oct 10, 2023 · 3 comments
Labels
bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@tferazzi
Copy link

What happened?

Deploying an instance with a public IP initially and removing it afterwards does not get recognized by pulumi.

Example

Deploying an instance with a public IP like this:

new gcp.compute.Instance('my-instance-name', {
    name: 'my-instance-name',
    zone: 'europe-west4-a',
    machineType: 'f1-micro',
    networkInterfaces: [
      {
        subnetwork: args.subnetworkId,
        accessConfigs: [
          {
            networkTier: 'PREMIUM',
          },
        ],
      },
    ],
    bootDisk: {
      initializeParams: {
        image: 'ubuntu-2204-jammy-v20230727',
      },
    },
  });

And then removing the accessConfigs block like this:

new gcp.compute.Instance('my-instance-name', {
    name: 'my-instance-name',
    zone: 'europe-west4-a',
    machineType: 'f1-micro',
    networkInterfaces: [
      {
        subnetwork: args.subnetworkId,
        // accessConfigs: [
        //   {
        //     networkTier: 'PREMIUM',
        //   },
        // ],
      },
    ],
    bootDisk: {
      initializeParams: {
        image: 'ubuntu-2204-jammy-v20230727',
      },
    },
  });

And doing pulumi up again, results in no update/change of the instance.

Output of pulumi about

CLI
Version      3.88.0
Go Version   go1.21.2
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown

Host
OS       darwin
Version  13.6
Arch     arm64

Additional context

This also does not work the other way round:

  1. Instance without public IP address
  2. Add accessConfigs block to networkInterfaces
  3. pulumi up -> results in no changes

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).

@tferazzi tferazzi added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 10, 2023
@mikhailshilkov
Copy link
Member

I can repro this issue locally, here is a full program:

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

new gcp.compute.Instance('my-instance-name', {
    name: 'my-instance-name',
    zone: 'europe-west4-a',
    machineType: 'f1-micro',
    networkInterfaces: [
      {
        network: "default",
        accessConfigs: [
          {
            networkTier: 'PREMIUM',
          },
        ],
      },
    ],
    bootDisk: {
      initializeParams: {
        image: 'ubuntu-2204-jammy-v20230727',
      },
    },
  });

cc @t0yv0 on another diff issue.

@mikhailshilkov mikhailshilkov added bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. and removed needs-triage Needs attention from the triage team labels Oct 12, 2023
@mjeffryes
Copy link
Member

Unfortunately, it looks like this issue hasn't seen any updates in a while. If you're still encountering this problem, could you leave a quick comment to let us know so we can prioritize it?

@mjeffryes mjeffryes added the awaiting-feedback Blocked on input from the author label Sep 25, 2024
@tferazzi
Copy link
Author

Hi, just tested this again: Removing the accessConfigs block now results in a diff/replace. So everything working as expected. Thank you for following up on this.

Tested with

> pulumi about

CLI
Version      3.134.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  gcp     7.38.0
language  nodejs  3.134.0-dev.0

Host
OS       darwin
Version  14.7
Arch     arm64

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Sep 26, 2024
@mikhailshilkov mikhailshilkov added resolution/fixed This issue was fixed and removed needs-triage Needs attention from the triage team labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. 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

4 participants