Skip to content

Commit

Permalink
Merge pull request #1377 from crossplane-contrib/fix/ec2-launchtempla…
Browse files Browse the repository at this point in the history
…te-update-loop

fix(ec2): launchtemplate late init remove for defaultVersion
  • Loading branch information
turkenf authored Jun 27, 2024
2 parents e4b8f22 + f5300f7 commit 6bfa63b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions apis/ec2/v1beta2/zz_launchtemplate_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions config/ec2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func Configure(p *config.Provider) {
r.References["network_interfaces.subnet_id"] = config.Reference{
TerraformName: "aws_subnet",
}
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"default_version"},
}

})

p.AddResourceConfigurator("aws_vpc_endpoint", func(r *config.Resource) {
Expand Down
5 changes: 1 addition & 4 deletions examples/ec2/v1beta1/launchtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ spec:
- cpuCredits: standard
disableApiTermination: true
ebsOptimized: "true"
elasticGpuSpecifications:
- type: test
elasticInferenceAccelerator:
- type: eia1.medium
instanceInitiatedShutdownBehavior: terminate
instanceMarketOptions:
- marketType: spot
Expand All @@ -43,6 +39,7 @@ spec:
- associatePublicIpAddress: "true"
placement:
- availabilityZone: us-west-2a
updateDefaultVersion: true
tagSpecifications:
- resourceType: instance
tags:
Expand Down

0 comments on commit 6bfa63b

Please sign in to comment.