Hello, whats the currently recommended way to use ...
# getting-started
i
Hello, whats the currently recommended way to use existing ServiceCatalog/Cloudformation templates with pulumi and python? What i have tried so far: 1. The template converter (https://www.pulumi.com/cf2pulumi/) but that leads to a bug https://github.com/pulumi/pulumi-aws-native/issues/429 2. Importing (for example) IAM users with “pulumi import awsiam/userUser…” but the resulting code is missing properties that are present/configurable in my existing template So how would i best go about using an existing IAMUser template, import it into pulumi and pass in the required variables to create different IAM users?
e
Importing (for example) IAM users with “pulumi import awsiam/userUser…” but the resulting code is missing properties that are present/configurable in my existing template
That would be an import bug, if you can raise an issue at https://github.com/pulumi/pulumi-aws with a repro for this we could take a look. "import" should codegen for all non-default properties.
i
In the IAMUser template there are 3 variables and a tag, all of them are set when deployed using sceptre. here is there parameters snippet from the existing template
Copy code
...
Parameters:
  UserName:
    Type: String
    Description: A name for the IAM user.
  VariablesJSON:
    Type: String
    Description: A stringified...
    Default: '{"S3BucketName":"s3name"}'
  PolicyName:
    Type: String
    Description: A policy name.
  DMZTag:
    Type: String
    Description: (Optional) Description...
    Default: "NONE"
    AllowedValues:
...
When importing the existing IAMUser using pulumi
Copy code
$ pulumi import aws:iam/user:User user-storage-ro user-storage-ro
this is all the code generated
Copy code
user_storage_ro = aws.iam.User(
"user-storage-ro",
name="user-storage-ro",
opts=pulumi.ResourceOptions(protect=True))
Does that look like a bug that should be reported or am i doing sth wrong / missing sth?
e
Yeh that looks like a bug
i
OK, i will report, np.
Got any input on using existing templates with pulumi? 🙂
e
No sorry, the recommendation is normally use import but if this resources is bugging out right now that makes things a bit hard.
i
Ok, thx. let me report the bug… 🙂
🙏 1
if you need more info or want me to test sth, please let me know
e
Thanks that should be enough to look into it