pulumi-aws
pulumi-aws copied to clipboard
Import of SpotInstanceRequest duplicates property instanceInterruptionBehavior
Hello!
- 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)
Issue details
Importing an existing AWS SpotInstanceRequest duplicates the property instanceInterruptionBehavior
instanceInterruptionBehavior: "stop", instanceInterruptionBehavior: "stop",
A diagnostic warning is also issues for this.
Diagnostics:
aws:ec2:SpotInstanceRequest (linux-build2-spot-request):
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/spotInstanceRequest:SpotInstanceRequest resource 'linux-build2-spot-request' has a problem: Conflicting configuration arguments: "instance_interruption_behaviour": conflicts with instance_interruption_behavior. Examine values at 'SpotInstanceRequest.InstanceInterruptionBehaviour'.
warning: aws:ec2/spotInstanceRequest:SpotInstanceRequest resource 'linux-build2-spot-request' has a problem: Conflicting configuration arguments: "instance_interruption_behavior": conflicts with instance_interruption_behaviour. Examine values at 'SpotInstanceRequest.InstanceInterruptionBehavior'.
Without fixing this on attempt to update the resources Pulumi will now attempt to delete that resource. Manually removing the duplicate however fixes the issues.
Steps to reproduce
- Import and existing AWS Spot Instance request with command `pulumi import aws:ec2/spotInstanceRequest:SpotInstanceRequest name id
- Notice the diagnostic error
- Copy import code to your stack
- Run Pulumi preview and notice that it attempts to delete the resource
Expected: The resource to be imported without a diagnostic warning and duplicate field Actual: The resource is imported with a diagnostic warning and duplicate field
Hi @chivandikwa - thank you for filing this issue. ❤️
Can you verify the version of Pulumi you're using? We've been shipping a lot of updates to Pulumi Import recently so if you could verify this bug on the most recent version, that would be very helpful!
The error message notwithstanding, this seems like it is an issue with Pulumi itself rather than this specific provider.
Hi @guineveresaenger I was using version 3.27.0