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

Tags not read when importing with defaultTags #1564

Closed
Fydon opened this issue Jan 23, 2024 · 1 comment
Closed

Tags not read when importing with defaultTags #1564

Fydon opened this issue Jan 23, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team

Comments

@Fydon
Copy link

Fydon commented Jan 23, 2024

What happened?

I set aws.Provider's defaultTags and then tried some imports. Some work, but some are failing as it claims that tags don't match in spite of tags being present.

For AWS Backup Plans, calling aws backup get-backup-plan does not return tags (doc). To get tags, aws backup list-tags needs to be called (doc). Even though I've set the tags on a backup plan, it won't import because it claims the tags are missing. Using the above commands, I can get the tags so they are set. Could the underlying code be failing to perform the extra step to get tags when importing?

I'm experiencing the same problem with Backup Vaults and Roles. For Vaults, aws backup describe-backup-vault (doc) doesn't return tags but again aws backup list-tags does. For Roles, aws iam get-role does return tags.

Example

To keep this simple, I'll just provide the vault

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

const provider = new aws.Provider(
  'provider-us-east-1',
  {
    defaultTags: {
      tags: {
        'pulumi:project': pulumi.getProject(),
        'pulumi:stack': pulumi.getStack(),
      },
    },
    profile: 'aws',
    region: 'us-east-1',
  }
);

const vault = new aws.backup.Vault(
  'productionVault',
  {
    name: 'production',
  },
  {
    import: 'production',
    parent: provider,
    provider,
  }
);

Output of pulumi about

CLI
Version      3.102.0
Go Version   go1.21.5
Go Compiler  gc

Plugins
NAME    VERSION
aws     6.18.2
nodejs  unknown

Host
OS       Microsoft Windows 11 Pro
Version  10.0.22631 Build 22631
Arch     x86_64

This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v16.15.0'

Additional context

When removing defaultTags, I had to remove the tags to allow the import to proceed.

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

@Fydon Fydon added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 23, 2024
@Fydon
Copy link
Author

Fydon commented Jan 24, 2024

Sorry I created this in the wrong repository. I've moved it to pulumi-aws.

@Fydon Fydon closed this as completed Jan 24, 2024
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 needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

1 participant