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

name_prefix broken? #6155

Closed
rtoma opened this issue Jan 20, 2021 · 6 comments
Closed

name_prefix broken? #6155

rtoma opened this issue Jan 20, 2021 · 6 comments
Labels
impact/quality kind/bug Some behavior is incorrect or out of spec

Comments

@rtoma
Copy link

rtoma commented Jan 20, 2021

The resource parameter name_prefix seem broken. I noticed this with aws.LogGroup. Haven't tested with other resources.

Actually this parameter is pretty pointless, since Pulumi does auto naming by default. Maybe just remove this parameter?

This is the code I use:

import pulumi_aws as aws

aws.cloudwatch.LogGroup('lg', name_prefix='pulumi-nameprefix-test')

This issue may be related to pulumi/pulumi-terraform#210 where it was mentioned but also marked as resolved. Regression?

Expected Behavior

Pulumi creates the log group with a name starting with the specified prefix. Just like auto naming when name_prefix is omitted.

Current Behavior

Fails with:

error: aws:cloudwatch/logGroup:LogGroup resource 'lg' has a problem: ConflictsWith: "name": conflicts with name_prefix

Even though I have not specified the name parameter. Only resource_name and name_prefix.

Steps to Reproduce

  1. Use included snippet above
  2. Pulumi up ftw

Context (Environment)

@rtoma rtoma added the needs-triage Needs attention from the triage team label Jan 20, 2021
@lukehoban
Copy link
Member

lukehoban commented Jan 20, 2021

In pulumi/pulumi-aws#143 (comment), it was claimed that this should no longer happen. cc @pgavlin.

@tlinhart
Copy link

I've just encountered the exact same issue as described above.

@dferretti
Copy link
Contributor

Same here, using the dotnet SDK for Pulumi 3.1.0, Pulumi.Aws 4.1.0. The Autoscaling.Group resource is breaking similarly for me using NamePrefix.

@dgivens
Copy link

dgivens commented Jun 17, 2021

Just a +1 with aws.autoscaling.Group in typescript SDK, Pulumi 3.4.0, AWS 4.7.0.

@leezen leezen added kind/bug Some behavior is incorrect or out of spec and removed needs-triage Needs attention from the triage team labels Jul 2, 2021
@schmurfy
Copy link

same with gcp.compute.InstanceTemplate: pulumi/pulumi-gcp#631
this currently prevent me from migrating from terraform to pulumi, even if pulumi does generate a random name I want to keep the current behaviour.

@iwahbe
Copy link
Member

iwahbe commented Nov 10, 2021

I just tested this with aws: 4.27.1 and pulumi 3.17.0. It seems to just work.

import pulumi_aws as aws
import pulumi
lg = aws.cloudwatch.LogGroup('lg', name_prefix='pulumi-nameprefix-test')
pulumi.export('name', lg.name)
Updating (dev)

View Live: https://app.pulumi.com/iwahbe/6155-repro/dev/updates/3

     Type                        Name            Status      
 +   pulumi:pulumi:Stack         6155-repro-dev  created     
 +   └─ aws:cloudwatch:LogGroup  lg              created     
 
Outputs:
    name: "pulumi-nameprefix-test20211110191147084700000001"

Resources:
    + 2 created

Duration: 5s

If this is still a problem for you, please reopen the issue.

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

No branches or pull requests

9 participants