Skip to content

Commit

Permalink
Merge pull request #618 from ericzbeard/v-1-20-1
Browse files Browse the repository at this point in the history
Fixing incorrect schema
  • Loading branch information
ericzbeard authored Dec 16, 2024
2 parents a3e5ece + db2f86f commit 2f95fc3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 14 additions & 1 deletion internal/aws/cfn/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,22 @@ func patchDynamoDBTable(schema *Schema) error {
return nil
}

func patchAEC2VerifiedAccessTrustProvider(schema *Schema) error {
func patchEC2VerifiedAccessTrustProvider(schema *Schema) error {
// This one is apparently a placeholder schema
// Remove the extraneous def that points to itself
delete(schema.Definitions, "SseSpecification")
return nil
}

func patchEC2LaunchTemplate(schema *Schema) error {
// The schema is missing a definition for NetworkPerformanceOptions
// Delete it if the definition is not there (so this works if they add it)
name := "NetworkPerformanceOptions"
if _, ok := schema.Definitions[name]; !ok {
ltd, exists := schema.Definitions["LaunchTemplateData"]
if exists {
delete(ltd.Properties, name)
}
}
return nil
}
4 changes: 3 additions & 1 deletion internal/aws/cfn/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ func (schema *Schema) Patch() error {
case "AWS::DynamoDB::Table":
return patchDynamoDBTable(schema)
case "AWS::EC2::VerifiedAccessTrustProvider":
return patchAEC2VerifiedAccessTrustProvider(schema)
return patchEC2VerifiedAccessTrustProvider(schema)
case "AWS::EC2::LaunchTemplate":
return patchEC2LaunchTemplate(schema)
}
return nil
}
Expand Down

0 comments on commit 2f95fc3

Please sign in to comment.