Skip to content

Add hcp_packer_bucket_iam_binding and hcp_packer_bucket_iam_policy resources #866

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

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

JenGoldstrich
Copy link
Contributor

@JenGoldstrich JenGoldstrich commented Jun 13, 2024

🛠️ Description

Add binding and policy resource for HCP Packer Bucket's using common scaffolding,

Will be merged into this PR #852 and then all merged into main in one commit

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccPackerBucket*' > blah.txt
$ cat blah.txt | pbcopy
==> Checking that code complies with gofmt requirements...
golangci-lint run --config ./golangci-config.yml 
TF_ACC=1 go test ./internal/... -v -run=TestAccPackerBucket* -timeout 360m -parallel=10
?   	github.com/hashicorp/terraform-provider-hcp/internal/clients/iampolicy	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/clients/packerv2	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/clients	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/consul	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/hcpvalidator	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/input	(cached) [no tests to run]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/acctest	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/customtypes	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/modifiers	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/iam	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/logstreaming	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/datasources/artifact	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/datasources/version	(cached) [no tests to run]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/testutils	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/testutils/configbuilder/packerconfig	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/testutils/configbuilder	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/testutils/testcheck	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/testutils/testclient	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/utils	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/utils/location	[no test files]
?   	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/utils/base	[no test files]
=== RUN   TestAccPackerBucketIamPolicyResource
--- PASS: TestAccPackerBucketIamPolicyResource (7.99s)
=== RUN   TestAccPackerBucketIamBindingResource
--- PASS: TestAccPackerBucketIamBindingResource (7.24s)
=== RUN   TestAccPackerBucketResource
--- PASS: TestAccPackerBucketResource (5.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/packer/resources/bucket	(cached)
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/resourcemanager	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/vaultsecrets	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/waypoint	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/webhook	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/webhook/validator	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/providersdkv2	(cached) [no tests to run]
...

@JenGoldstrich JenGoldstrich changed the base branch from main to hpr-1729-bucket-resource June 13, 2024 00:37
@@ -1,3 +1,5 @@
```release-note:feature
New resource: Add `hcp_packer_bucket` resource for managing HCP Packer buckets
New Resource: Add `hcp_packer_bucket_iam_policy` resource for assigning a list of policy bindings to multiple principals for a HCP Packer Bucket
Copy link
Contributor Author

@JenGoldstrich JenGoldstrich Jun 13, 2024

Choose a reason for hiding this comment

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

Since PR 852 is the one that will get merged into main, I figured it made sense to update the changelog here

@JenGoldstrich JenGoldstrich marked this pull request as ready for review June 14, 2024 15:12
@JenGoldstrich JenGoldstrich requested review from a team as code owners June 14, 2024 15:12
@JenGoldstrich JenGoldstrich marked this pull request as draft June 15, 2024 00:50
Copy link

@sylviamoss sylviamoss left a comment

Choose a reason for hiding this comment

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

Nice! I know it is a draft still but this looks good to me! 👍🏼
Just added tiny comments to the guide.

@JenGoldstrich JenGoldstrich marked this pull request as ready for review June 17, 2024 14:51
@JenGoldstrich JenGoldstrich force-pushed the hpr-1729-bucket-resource branch from 9a9c057 to df6c4bc Compare June 17, 2024 14:52
@JenGoldstrich JenGoldstrich force-pushed the hpr-1728-bucket-binding branch from b20b224 to 0c932c4 Compare June 17, 2024 19:49
@JenGoldstrich JenGoldstrich merged commit fc57e35 into hpr-1729-bucket-resource Jun 17, 2024
5 checks passed
@JenGoldstrich JenGoldstrich deleted the hpr-1728-bucket-binding branch June 17, 2024 23:29
JenGoldstrich added a commit that referenced this pull request Jun 18, 2024
…` resources (#866)

* Add resources for managing Packer Bucket RBAC

* Add guide for bucket rbac

* Add examples and guide

* Update docs

* Moss's feedback
JenGoldstrich added a commit that referenced this pull request Jun 28, 2024
…` resources (#866)

* Add resources for managing Packer Bucket RBAC

* Add guide for bucket rbac

* Add examples and guide

* Update docs

* Moss's feedback
sylviamoss pushed a commit that referenced this pull request Jul 2, 2024
…g`, and `hcp_packer_bucket_iam_policy` resources #866  (#852)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants