This message was deleted.
# general
s
This message was deleted.
k
I am not familiar with the Azure Pulumi API, but usually there is a
name
field in the constructor of the resource which if you provide a value to it, that will be the name of the resource in your Azure console
m
Thank you , let me try
k
So when I mean the constructor, probably it's in the second parameter which is usually the arguments of the resources
resource(pulumi_name, args={name:"<THIS_ONE>"}, ...other_args)
m
core.NewResourceGroup(ctx, "testpulumi", &core.ResourceGroupArgs{
            
Location: pulumi.String("WestUS"),
        
})
I did this way, but there are few characters getting added to "testpulumi"
k
In the
ResourceGroupArgs
parameter (https://github.com/pulumi/pulumi-azure-nextgen/blob/6156ad137c7c3fcb6bbbf4d3f9a323f686c41ce9/sdk/go/azure/resources/v20200601/resourceGroup.go#L155) there is a key called
name
which is the one that you need to provide it a value to get the name you want.
Copy code
core.NewResourceGroup("ctx, testpulumi", &core.ResourceGroupArgs{
  ResourceGroupName: "<NAME_GOES_HERE>"
  Location: pulumi.String("WestUS"),
})
c
@magnificent-restaurant-51456 You would need to set the
name
parameter. This is due to auto-naming There is a sample code block: for
ts
Copy code
let role = new aws.iam.Role("my-role", {
    name: "my-role-001",
});
for
go
Copy code
role, err := iam.NewRole(ctx, "my-role", &iam.RoleArgs{
    Name: pulumi.String("my-role-001"),
})