-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix output for CF and TF #10164
Fix output for CF and TF #10164
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -115,7 +114,19 @@ func (e *IAMRolePolicy) Find(c *fi.Context) (*IAMRolePolicy, error) { | |||
if err != nil { | |||
return nil, fmt.Errorf("error parsing PolicyDocument for IAMRolePolicy %q: %v", aws.StringValue(e.Name), err) | |||
} | |||
actual.PolicyDocument = fi.WrapResource(fi.NewStringResource(policy)) | |||
|
|||
// Reformat the PolicyDocument by unmarshaling and re-marshaling to JSON. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this necessary exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document is just a JSON that is stored in AWS. In Direct and TF case, what you send is what you get back.
In the case of CloudFormation.... you get back a nice "optimised" JSON, that is no longer matching what was sent. Obviously, kops update cluster
sees this as a change and tries to fix it.
/test pull-kops-bazel-test |
/lgtm |
…-upstream-release-1.19 Automated cherry pick of #10164: Add missing resource names for CF
This addresses a few issues that makes
update cluster
show that there are unapplied changes: