Skip to content
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

TF 0.12 pretty print google_iam_policy #3918

Closed
marcbas1 opened this issue Jun 25, 2019 · 2 comments
Closed

TF 0.12 pretty print google_iam_policy #3918

marcbas1 opened this issue Jun 25, 2019 · 2 comments

Comments

@marcbas1
Copy link

When making a small change to a google project's IAM policy, the terraform plan output becomes completely unreadable. If I remove one user from roles/owner the policy_data shows many more additions and deletions and becomes completely unreadable. We want to make sure from the plan output that it is indeed removing the one user as intended.

For TF 0.12, this is what the output looks like

  # google_project_iam_policy.test-infra will be updated in-place                                                                                                                                                                            
  ~ resource "google_project_iam_policy" "test-infra" {                                                                                                                                                                                      
        etag           = "hdsgJDHGaEC4="                                                                                                                                                                                                       
        id               = "test-infra"                                                                                                                                                                                                        
      ~ policy_data    = jsonencode(                                                                                                                                                                                                          
          ~ {
            ~ bindings = [                                                                                                                                                                                                                  
                  ~ {                                                                                                                                                                                                                         
                      ~ members = [    
...

In TF 0.11 the plan output was something like this:

  # google_project_iam_policy.test-infra will be updated in-place                                                                                                                                                                            
  ~ resource "google_project_iam_policy" "test-infra" {                                                                                                                                                                                      
        etag           = "hdsgJDHGaEC4="                                                                                                                                                                                                       
        id               = "test-infra"                                                                                                                                                                                                        
      ~ policy_data    = { OLD_JSON } -> { NEW_JSON }

We had written a parser for TF 0.11 to parse OLD_JSON and diff against NEW_JSON to help us better identify diffs.

Is it possible to either have TF 0.12 print the json string like TF 0.11 did, or have the diff be more readable in the output.

@pdecat
Copy link
Contributor

pdecat commented Jun 25, 2019

Resolved by #3855

@ghost
Copy link

ghost commented Jul 26, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants