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

Add Policy, Attestor, and Note resources for Binary Authorization #1885

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

modular-magician
Copy link
Collaborator

@danawillow
Copy link
Contributor

@ndmckinley in case you want to look at it now, here it is. I found another opportunity to break off some changes separately so I'm going to do that so this isn't crowded with changes to every other resource.

@modular-magician modular-magician force-pushed the codegen-pr-406 branch 2 times, most recently from b2354c9 to 8951bb7 Compare August 16, 2018 19:25
"github.com/hashicorp/terraform/helper/schema"
)

func resourceBinaryauthorizationAttestor() *schema.Resource {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix this capitalization? I did it with a hack for ResourceManager iirc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! I fixed the hack too.

`, name, name, armoredPubKey)
}

const armoredPubKey = `mQENBFtP0doBCADF+joTiXWKVuP8kJt3fgpBSjT9h8ezMfKA4aXZctYLx5wslWQl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some particular key, or just a valid one we happen to have?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a valid one, I added a comment.

@modular-magician modular-magician force-pushed the codegen-pr-406 branch 5 times, most recently from 798d263 to 829b531 Compare August 18, 2018 02:58
@danawillow
Copy link
Contributor

All right, I've been fighting with these tests and the magician for the past 2 days now but this is finally ready for review again. Tests are passing.

return nil, err
}
transformed["id"] = transformedId
transformedAsciiArmoredPgpPublicKey, err := expandBinaryAuthorizationAttestorAttestationAuthorityNotePublicKeysAsciiArmoredPgpPublicKey(original["ascii_armored_pgp_public_key"], d, config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These names get a little crazy, don't they?

},

Schema: map[string]*schema.Schema{
"attestation_authority": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole thing is just a single string, right? It's a little messy for users ... is it a lot of work to collapse nested objects?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked about this over chat, but for others- yes, it would be a lot of work. Right now we can rename things easily but we don't have an easy way to change the type of a field- the best we'd be able to do is a lot of custom code, which we don't want to do.

@danawillow danawillow merged commit 3ff7ccc into hashicorp:master Aug 20, 2018
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
@ghost
Copy link

ghost commented Nov 17, 2018

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 Nov 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants