Hi, I'm trying to import manually created EC2 laun...
# aws
p
Hi, I'm trying to import manually created EC2 launch templates to Pulumi state following this guide. However, I'm getting this warning during import:
Copy code
$ pulumi import aws:ec2/launchTemplate:LaunchTemplate internal-services lt-xxxxx
Previewing import (internal-services-dev):
     Type                       Name                                               Plan       Info
     pulumi:pulumi:Stack        internal-services-internal-services-dev             
 =   └─ aws:ec2:LaunchTemplate  internal-services                                  import     3
 
Diagnostics:
  aws:ec2:LaunchTemplate (internal-services):
    warning: One or more imported inputs failed to validate. This is almost certainly a bug in the `aws` provider. The import will still proceed, but you will need to edit the generated code after copying it into your program.
    warning: aws:ec2/launchTemplate:LaunchTemplate resource 'internal-services' has a problem: expected metadata_options.0.http_protocol_ipv6 to be one of [disabled enabled], got . Examine values at 'LaunchTemplate.MetadataOptions.HttpProtocolIpv6'.
    warning: aws:ec2/launchTemplate:LaunchTemplate resource 'internal-services' has a problem: expected metadata_options.0.instance_metadata_tags to be one of [disabled enabled], got . Examine values at 'LaunchTemplate.MetadataOptions.InstanceMetadataTags'.
 

Do you want to perform this import?
When I copy/paste the generated code, it doesn't pass the validations during
pulumi up
because of these values:
Copy code
...    
    metadata_options=aws.ec2.LaunchTemplateMetadataOptionsArgs(
        http_endpoint="enabled",
        http_protocol_ipv6="",  <-- needs to be either "disabled" or "enabled"
        instance_metadata_tags="",  <-- needs to be either "disabled" or "enabled"
    )
...
I'm not sure how to proceed. I'd manually change the values for existing launch template, but there doesn't seem to be an option to specify these values in AWS console nor using AWS CLI. So I'd either need to bypass the Pulumi checks for matching inputs with the existing resource's values (while specifying `enabled`/`disabled` for the corresponding metadata options) or disable validations using
pulumi up
(while leaving the metadata options empty to match the existing resource's values). Is any of these possible or is there any other way how to proceed?
Just to be complete, I'm using Pulumi CLI v3.32.1.
b
could you file an issue for this, including
pulumi about
output
p
b
thanks!