Skip to content

Commit

Permalink
fix(iam-role): ignore managed_policy_arns in late init
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Haar <[email protected]>
  • Loading branch information
haarchri committed Oct 22, 2023
1 parent 2f46d70 commit 765c950
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/iam/v1beta1/zz_generated_terraformed.go

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

3 changes: 3 additions & 0 deletions config/iam/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func Configure(p *config.Provider) {
p.AddResourceConfigurator("aws_iam_role", func(r *config.Resource) {
r.MetaResource.ArgumentDocs["inline_policy"] = `Configuration block defining an exclusive set of IAM inline policies associated with the IAM role. See below. If no blocks are configured, Crossplane will not manage any inline policies in this resource. Configuring one empty block (i.e., inline_policy {}) will cause Crossplane to remove all inline policies added out of band on apply.`
r.MetaResource.ArgumentDocs["managed_policy_arns"] = `Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is not configured, Crossplane will ignore policy attachments to this resource. When configured, Crossplane will align the role's managed policy attachments with this set by attaching or detaching managed policies. Configuring an empty set (i.e., managed_policy_arns = []) will cause Crossplane to remove all managed policy attachments.`
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"managed_policy_arns"},
}
})

p.AddResourceConfigurator("aws_iam_instance_profile", func(r *config.Resource) {
Expand Down

0 comments on commit 765c950

Please sign in to comment.