Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#797 from haarchri/fix/cloudwatc…
Browse files Browse the repository at this point in the history
…hloggroup

fix(aws_cloudwatch_log_group): skip name_prefix lateinit
  • Loading branch information
ytsarev authored Jul 21, 2023
2 parents 8557210 + 06091b5 commit 9e5f614
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/cloudwatchlogs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ func Configure(p *config.Provider) {
Extractor: common.PathTerraformIDExtractor,
}
})

p.AddResourceConfigurator("aws_cloudwatch_log_group", func(r *config.Resource) {
config.MarkAsRequired(r.TerraformResource, "name")
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"name_prefix"},
}
})

}
1 change: 1 addition & 0 deletions examples/cloudwatchlogs/group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
forProvider:
region: us-west-1
retentionInDays: 5
tags:
Application: serviceA
Environment: production

0 comments on commit 9e5f614

Please sign in to comment.