Compare commits

..
85 Commits
Author SHA1 Message Date
Damian Debkowski e847f5fde7 chore: update changelog for 1.1.15 release
Lint GitHub Actions workflows / actionlint (push) Failing after 16s
make-gen-delta / Check for uncommitted changes from make gen (push) Failing after 1m48s
Release / go-version (push) Successful in 8s
Release / release-notes (push) Failing after 39s
Release / Terraform Provider Release (push) Skipped
test / test (push) Failing after 4m50s
2024-05-01 09:57:27 -07:00
Todd 53c2a5769c Add target alias resource (#571)
* Add target alias resource

* increment the number of authorize_acctions returned on an admin user
2024-05-01 09:37:45 -07:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] ed1bf21505 Result of tsccr-helper -log-level=info gha update -latest . (#606)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-05-01 10:19:55 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 6a23fc20f9 Result of tsccr-helper -log-level=info gha update -latest . (#591)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-04-01 09:55:08 -04:00
Louis Ruch 41653b2ccd chore: Update deps 2024-03-03 22:02:25 -08:00
dependabot[bot] 398eaf8406 build(deps): bump github.com/jimlambrt/gldap from 0.1.9 to 0.1.11
Bumps [github.com/jimlambrt/gldap](https://github.com/jimlambrt/gldap) from 0.1.9 to 0.1.11.
- [Release notes](https://github.com/jimlambrt/gldap/releases)
- [Commits](https://github.com/jimlambrt/gldap/compare/v0.1.9...v0.1.11)

---
updated-dependencies:
- dependency-name: github.com/jimlambrt/gldap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-03 21:30:12 -08:00
dependabot[bot] c71ba43a3d build(deps): bump golang.org/x/crypto from 0.19.0 to 0.20.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/crypto/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-03 21:29:40 -08:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 1153ea44ee Result of tsccr-helper -log-level=info gha update -latest . (#569)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-03-01 09:24:07 -05:00
Danielle Miu 2020819648 add new section to changelog for next 2024-02-14 13:32:21 -05:00
Danielle Miu b7eadd565f update changelog to include policies feat
Lint GitHub Actions workflows / actionlint (push) Failing after 13s
make-gen-delta / Check for uncommitted changes from make gen (push) Failing after 1m5s
Release / go-version (push) Successful in 7s
Release / release-notes (push) Failing after 24s
Release / Terraform Provider Release (push) Skipped
test / test (push) Failing after 4m19s
2024-02-14 13:17:58 -05:00
daniandDanielle Miu 7e7707d3af feat(policies): support storage policies within terraform (#558)
Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
2024-02-13 16:22:18 -08:00
Jeff Mitchell 8c12b27f8f Add support for grant_scope_ids (#562) 2024-02-13 15:01:48 -05:00
Jeff Mitchell 93e41ae83d Add id warning (#563)
* Add id warning

This adds a warning about using id in grants, which is no longer
supported when running against 0.15+.

* Add to Create as well
2024-02-09 15:30:13 -05:00
Jeff Mitchell bbc5889404 Fix space at beginning of description 2024-02-08 09:15:26 -05:00
Elim Tsiagbey 933192280b docs: Add required field for storage bucket example (#557)
Update example for dynamic credential for storage bucket to include `disable_credential_rotation` attribute. `disable_credential_rotation` needs to be set to true when configuring dynamic credentials
2024-02-06 11:00:46 -05:00
Louis Ruch 8383852445 fix: Use go-version in release step
Lint GitHub Actions workflows / actionlint (push) Failing after 13s
Release / go-version (push) Successful in 6s
make-gen-delta / Check for uncommitted changes from make gen (push) Failing after 1m8s
Release / release-notes (push) Failing after 21s
Release / Terraform Provider Release (push) Skipped
test / test (push) Failing after 3m7s
2024-02-01 17:15:52 -08:00
Louis Ruch 06e9bf65c9 Use .go-version 2024-02-01 16:51:40 -08:00
Louis Ruch 9070fdfd6c chore: update to go 1.21.5 2024-02-01 16:06:58 -08:00
Louis Ruch 692793b6a2 Revert "fix: Remove toolchain for release build"
This reverts commit 6a5aef4467.
2024-02-01 15:46:07 -08:00
Louis Ruch 6a5aef4467 fix: Remove toolchain for release build 2024-02-01 14:31:23 -08:00
Louis Ruch af4f61199a chore: add changelog for release 2024-02-01 14:10:28 -08:00
Louis Ruch 747f962295 chore: Update Boundary version 2024-02-01 11:23:30 -08:00
prsekar 417bad5d36 Handle grant string id to ids 2024-02-01 11:21:33 -08:00
dependabot[bot] 069032103e build(deps): bump actions/cache from 3.3.2 to 4.0.0 (#542)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.2 to 4.0.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/704facf57e6136b1bc63b828d79edcd491f0ee84...13aacd865c20de90d75de3b17ebe84f7a17d57d2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:03:38 -08:00
dependabot[bot] 292b1057e8 build(deps): bump hashicorp/ghaction-terraform-provider-release (#544)
Bumps [hashicorp/ghaction-terraform-provider-release](https://github.com/hashicorp/ghaction-terraform-provider-release) from 2 to 3.
- [Release notes](https://github.com/hashicorp/ghaction-terraform-provider-release/releases)
- [Changelog](https://github.com/hashicorp/ghaction-terraform-provider-release/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/ghaction-terraform-provider-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: hashicorp/ghaction-terraform-provider-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:03:19 -08:00
dependabot[bot] bd0754188a build(deps): bump github.com/hashicorp/terraform-plugin-docs (#547)
Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.16.0 to 0.18.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.16.0...v0.18.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-docs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:03:01 -08:00
dependabot[bot] f09ab2dda7 build(deps): bump actions/upload-artifact from 3.1.3 to 4.3.0 (#546)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/a8a3f3ad30e3422c9c7b888a15615d19a852ae32...26f96dfa697d77e81fd5907df203aa23a56210a8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 08:59:35 -08:00
dependabot[bot] 288fa8e9b0 build(deps): bump github.com/opencontainers/runc from 1.1.5 to 1.1.12 (#551)
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.5 to 1.1.12.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.12/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.5...v1.1.12)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 08:58:55 -08:00
Damian Debkowski a65623e36a allow dynamic credentials for storage buckets (#549) 2024-01-30 09:23:09 -08:00
Pradeep Sekar e4b7ff1490 Revert "build(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0 (#527)" (#537)
Lint GitHub Actions workflows / actionlint (push) Failing after 13s
Release / go-version (push) Successful in 12s
Release / release-notes (push) Successful in 11s
Release / Terraform Provider Release (push) Failing after 0s
make-gen-delta / Check for uncommitted changes from make gen (push) Failing after 1m9s
test / test (push) Failing after 59m13s
This reverts commit 8e5cefb668.
2024-01-09 10:16:25 -08:00
Pradeep Sekar db838bdaed chore: Add changelog for release (#534) 2024-01-08 11:37:34 -08:00
c1bc59c36e enable support for ssh valid certs additional valid principals field (#512)
* enable support for ssh valid certs additional valid principals field

* chore: Bump Dependencies to 0.14.3 Release

---------

Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
Co-authored-by: prsekar <pradeep.sekar@hashicorp.com>
2024-01-05 10:38:47 -08:00
dependabot[bot] 8e5cefb668 build(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0 (#527)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/a8a3f3ad30e3422c9c7b888a15615d19a852ae32...c7d193f32edcb7bfad88892161225aeda64e9392)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:19:15 -08:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] f002574978 Result of tsccr-helper -log-level=info gha update -latest . (#532)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-01-05 10:18:57 -08:00
dependabot[bot] 44b2ffb53f build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 (#526)
Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:18:26 -08:00
dependabot[bot] 7d3191a2ae build(deps): bump actions/setup-go from 4.1.0 to 5.0.0 (#523)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/93397bea11091df50f3d7e59dc26a7711a8bcfbe...0c52d547c9bc32b1aa3301fd7a9cb496313a4491)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:18:13 -08:00
dependabot[bot] d270a75143 build(deps): bump github.com/hashicorp/go-kms-wrapping/v2 (#521)
Bumps [github.com/hashicorp/go-kms-wrapping/v2](https://github.com/hashicorp/go-kms-wrapping) from 2.0.14 to 2.0.15.
- [Commits](https://github.com/hashicorp/go-kms-wrapping/compare/v2.0.14...v2.0.15)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-kms-wrapping/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:17:57 -08:00
dependabot[bot] f0e5ed6760 build(deps): bump golang.org/x/crypto in /plugins/kms/mains/transit (#528)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:17:39 -08:00
dependabot[bot] e57d6b2060 build(deps): bump github.com/hashicorp/cap from 0.4.0 to 0.4.1 (#531)
Bumps [github.com/hashicorp/cap](https://github.com/hashicorp/cap) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/hashicorp/cap/releases)
- [Changelog](https://github.com/hashicorp/cap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/cap/compare/v0.4.0...v0.4.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/cap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 10:17:16 -08:00
Michael Li 212d64aaf8 test: Fix failure in TestAccCredentialStoreVault (#525)
* test: Fix error in TestAccCredentialStoreVault

* chore: Fix errors in "Set up Go modules cache"
2023-12-14 09:41:44 -05:00
Elim Tsiagbey 6f9a6a84cb chore: Add changelog for release
Lint GitHub Actions workflows / actionlint (push) Successful in 10s
Release / go-version (push) Successful in 11s
make-gen-delta / Check for uncommitted changes from make gen (push) Failing after 1m27s
Release / release-notes (push) Successful in 5s
Release / Terraform Provider Release (push) Failing after 0s
test / test (push) Failing after 48m44s
2023-12-13 16:12:20 -05:00
Elim Tsiagbey 9e30a68a61 feat(oidc): OIDC Prompt Support (#519)
* feat(oidc): OIDC Prompt Support

Boundary OIDC method does not currently support passing in prompts during authentication. This change adds the capability of passing OIDC prompts. Prompts are optional OIDC parameters that determine the behaviour of the authentication server: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

Add new optional `prompts` option to `boundary_auth_method_oidc` resource. `prompts` option are optional OIDC parameters that determine the behavior of the authentication server.
2023-12-13 16:05:01 -05:00
Elim Tsiagbey 99c7ae65e3 chore: Bump Dependencies to 0.14.3 Release (#524)
* chore: Bump Dependencies to 0.14.3 Release

- Bump github.com/hashicorp/boundary to [0.14.3](https://github.com/hashicorp/boundary/releases/tag/v0.14.3)
- Bump API & SDK to point to [8fb3f31f810242b41ff1d977b7a0d2a8ecc70ab5](https://github.com/hashicorp/boundary/pull/4132) commit

* ignore authorized actions in diff

* skip `TestAccCredentialStoreVault` test
2023-12-13 15:43:08 -05:00
drewmullen f8b69875c3 Fix boundary_worker auth token overwritten during creation & ForceNew on auth token change (#461)
* cannot update a worker generated auth token

* dont grab auth token from api reply
2023-12-13 10:11:32 -08:00
dependabot[bot] 0c26e251cd build(deps): bump github.com/jimlambrt/gldap from 0.1.8 to 0.1.9 (#518)
Bumps [github.com/jimlambrt/gldap](https://github.com/jimlambrt/gldap) from 0.1.8 to 0.1.9.
- [Release notes](https://github.com/jimlambrt/gldap/releases)
- [Commits](https://github.com/jimlambrt/gldap/compare/v0.1.8...v0.1.9)

---
updated-dependencies:
- dependency-name: github.com/jimlambrt/gldap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 10:09:05 -08:00
dependabot[bot] 9042a61ff4 build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#520)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 10:07:09 -08:00
dependabot[bot] 76a6686340 build(deps): bump golang.org/x/crypto from 0.15.0 to 0.16.0 (#522)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.16.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 10:06:53 -08:00
Michael Li 61c0ac92b3 feat: Add boundary_auth_method data source (#505) 2023-12-12 13:36:37 -08:00
drewmullenandMichael Li b1936800b3 Remove unneccsary template for user data source (#491)
* remove unnecessary template

* Update README.md

Co-authored-by: Michael Li <michael.li@hashicorp.com>

---------

Co-authored-by: Michael Li <michael.li@hashicorp.com>
2023-11-21 09:43:58 -08:00
dependabot[bot] 375fd1f5a2 build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2
Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.29.0 to 2.30.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.29.0...v2.30.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 16:39:03 +02:00
dependabot[bot] de6ae59fb0 build(deps): bump golang.org/x/crypto from 0.14.0 to 0.15.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 16:38:43 +02:00
dependabot[bot] 6ded668eff build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.3+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.3...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:43:58 +02:00
dependabot[bot] 47bbdb2254 build(deps): bump github.com/hashicorp/go-secure-stdlib/configutil/v2
Bumps [github.com/hashicorp/go-secure-stdlib/configutil/v2](https://github.com/hashicorp/go-secure-stdlib) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/hashicorp/go-secure-stdlib/releases)
- [Commits](https://github.com/hashicorp/go-secure-stdlib/compare/configutil/v2.0.10...configutil/v2.0.11)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-secure-stdlib/configutil/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:42:05 +02:00
dependabot[bot] 1aa73ab586 build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:26:15 +02:00
dependabot[bot] b91b346aec build(deps): bump google.golang.org/grpc in /plugins/kms/mains/ocikms
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:26:04 +02:00
dependabot[bot] 67e5191b8c build(deps): bump google.golang.org/grpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:25:56 +02:00
dependabot[bot] e78c21a13f build(deps): bump google.golang.org/grpc in /plugins/kms/mains/gcpckms
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:25:48 +02:00
dependabot[bot] dd5e5ea2da build(deps): bump google.golang.org/grpc in /plugins/kms/mains/transit
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:25:41 +02:00
dependabot[bot] e44d658615 build(deps): bump google.golang.org/grpc in /plugins/kms/mains/awskms
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:25:34 +02:00
dependabot[bot] 608d95e620 build(deps): bump google.golang.org/grpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 13:25:25 +02:00
Michael Li dc3adfa96a feat: Add boundary_group data source (#503)
* refact: Move groupMemberIdsKey const

* feat: Add `boundary_group` data source

* CR
2023-11-02 14:37:02 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 13f6a2497d Result of tsccr-helper -log-level=info -pin-all-workflows . (#514)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2023-11-02 14:15:12 -04:00
Michael Li b181e37a36 doc: Add examples for using LDAP (#506) 2023-10-27 14:42:17 -04:00
Michael Li bb5ed8609c feat: Add boundary_account data source (#493)
* feat: Add boundary_account data source

* CR
2023-10-26 12:52:23 -04:00
Michael Li 8bb1823ab4 doc: Fix linter errors (#502) 2023-10-26 12:47:49 -04:00
Michael Li 34dbe456de chore: Fix path error (#494) 2023-10-26 10:15:59 -04:00
Michael Li 63a1d9a5e9 fix: Address conflict in boundary_scope data source schema (#492)
* fix: Modify error message

* refact: Rename keys for consistency

* fix: Use scope_id in boundary_scope

The examples for the boundary_scope data source suggest to use `parent_scope_id`, but the provider is actually expecting `scope_id`.
2023-10-24 15:45:07 -04:00
Adam Bouhmad 54fd626ae5 Update Go & Terraform version requirement in README 2023-10-17 16:37:50 -07:00
dependabot[bot] fdcc5a6dab build(deps): bump actions/checkout from 3.5.3 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...8ade135a41bc03ea155e62e844d188df1ea18608)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 16:37:19 -07:00
drewmullen 0f2473a1d7 New Data source data.boundary_user (#468) 2023-10-17 16:36:51 -07:00
Mark Christopher WestandJim b06da56d75 Document OIDC Auth Method Resource (#467)
* Document OIDC Auth Method Resource

* fixup! Document OIDC Auth Method Resource

---------

Co-authored-by: Jim <jlambert@hashicorp.com>
2023-10-12 13:29:42 -04:00
Jim 9d351f8112 workflows: add make-gen-delta to chk for changes from 'make gen' (#486) 2023-10-12 13:28:38 -04:00
Jim 7f1fa78833 chore: fix test workflow for external contributors (#485)
* chore: fix test workflow for external contributors

Just run tests on ubuntu-latest, so they will succeed for
external contributors.
2023-10-12 12:45:50 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 2ff5736a18 Result of tsccr-helper -log-level=info -pin-all-workflows . (#465)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2023-10-12 05:44:09 -04:00
dependabot[bot] 1d3eb8c971 build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0 (#484)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 05:42:07 -04:00
dependabot[bot] e396447acc build(deps): bump golang.org/x/net in /plugins/kms/mains/alicloudkms (#481)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 05:41:22 -04:00
dependabot[bot] e27d8eb65d build(deps): bump golang.org/x/net in /plugins/kms/mains/gcpckms (#480)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 05:41:11 -04:00
dependabot[bot] 46f47aa7da build(deps): bump golang.org/x/net in /plugins/kms/mains/azurekeyvault (#479)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 05:41:00 -04:00
dependabot[bot] 58bc673ba9 build(deps): bump golang.org/x/net in /plugins/kms/mains/ocikms (#478)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 05:40:42 -04:00
dependabot[bot] cdf16323f9 build(deps): bump golang.org/x/net in /plugins/kms/mains/transit (#476)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 21:16:16 -04:00
Jim d48724aa09 chore: update boundary dependency (fix failing test) (#483) 2023-10-11 21:09:24 -04:00
Jim 3a1d5f842b chore: remove toolchain directive from go.mod (#482) 2023-10-11 20:14:19 -04:00
dependabot[bot] 2f697d5df0 build(deps): bump golang.org/x/net in /plugins/kms/mains/awskms (#477)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 19:14:23 -04:00
dependabot[bot] fcb13d9c76 build(deps): bump github.com/jimlambrt/gldap from 0.1.7 to 0.1.8 (#469)
Bumps [github.com/jimlambrt/gldap](https://github.com/jimlambrt/gldap) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/jimlambrt/gldap/releases)
- [Commits](https://github.com/jimlambrt/gldap/compare/v0.1.7...v0.1.8)

---
updated-dependencies:
- dependency-name: github.com/jimlambrt/gldap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 19:12:35 -04:00
Jim f1fbaa1bd9 chore: update go version to 1.21.3 (#475) 2023-10-11 19:10:09 -04:00
99 changed files with 4637 additions and 1073 deletions

No files matched your search

+2 -2
View File
@@ -6,9 +6,9 @@ permissions:
jobs:
actionlint:
runs-on: ${{ fromJSON(vars.RUNNER) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Check workflow files
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:02ccb6d91e4cb4a7b21eb99d5274d257e81ae667688d730e89d7ea0d6d35db91
with:
+2 -2
View File
@@ -77,14 +77,14 @@ jobs:
- name: Close ticket
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: Done
- name: Reopen ticket
if: github.event.action == 'reopened' && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: "To Do"
+43
View File
@@ -0,0 +1,43 @@
name: "make-gen-delta"
on:
- workflow_dispatch
- push
- pull_request
- workflow_call
permissions:
contents: read
jobs:
make-gen-delta:
name: "Check for uncommitted changes from make gen"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: '0'
- name: Determine Go version
id: get-go-version
# We use .go-version as our source of truth for current Go
# version, because "goenv" can react to it automatically.
run: |
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "${{ steps.get-go-version.outputs.go-version }}"
- name: Running go mod tidy
run: |
go mod tidy
- name: Install Dependencies
run: |
make tools
- name: Running make gen
run: |
make gen
- name: Check for changes
run: |
git diff --exit-code
git status --porcelain
test -z "$(git status --porcelain)"
+10 -6
View File
@@ -12,20 +12,24 @@ jobs:
go-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.go-version.outputs.version }}
version: ${{ steps.go-version.outputs.go-version }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- id: go-version
run: echo "name=version::$(cat ./.go-version)" >> "$GITHUB_OUTPUT"
# We use .go-version as our source of truth for current Go
# version, because "goenv" can react to it automatically.
run: |
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Generate Release Notes
run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: release-notes
path: release-notes.txt
@@ -33,7 +37,7 @@ jobs:
terraform-provider-release:
name: 'Terraform Provider Release'
needs: [go-version, release-notes]
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v2
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v3
secrets:
hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}'
hc-releases-host-staging: '${{ secrets.HC_RELEASES_HOST_STAGING }}'
+5 -4
View File
@@ -11,9 +11,9 @@ permissions:
jobs:
test:
runs-on: ${{ fromJSON(vars.RUNNER) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Determine go version
id: get-go-version
# We use .go-version as our source of truth for current Go
@@ -22,16 +22,17 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "${{ steps.get-go-version.outputs.go-version }}"
cache: false
- name: Determine Go cache paths
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go modules cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
${{ steps.go-cache-paths.outputs.go-build }}
+1 -1
View File
@@ -1 +1 @@
1.21.1
1.21.5
+22
View File
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch a test function",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"args": [
"-test.v",
"-test.run",
"^${selectedText}$"
],
"showLog": true,
"envFile": "${workspaceFolder}/.vscode/private.env"
}
]
}
+3
View File
@@ -0,0 +1,3 @@
TF_ACC=1
TF_LOG=INFO
GOFLAGS='-mod=readonly'
+52
View File
@@ -2,6 +2,58 @@
Canonical reference for changes, improvements, and bugfixes for the Boundary Terraform provider.
## Next
## 1.1.15 (May 1, 2024)
### New and Improved
* Add support for a target alias as a resource
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/571))
## 1.1.14 (February 14, 2024)
### New and Improved
* Support the multi-value `grant_scope_ids` field in the role provider
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/562))
* Support Boundary [Storage Policies](https://developer.hashicorp.com/boundary/docs/configuration/session-recording/configure-storage-policy)
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/558))
## 1.1.13 (February 1, 2024)
### New and Improved
* Allow dynamic credentials when configuring storage buckets
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/549))
## 1.1.12 (January 8, 2024)
### New and Improved
* Add support to configure valid_principals with Vault SSH Certificate Credential Library
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/512))
## 1.1.11 (December 13, 2023)
### New and Improved
* Add support for OIDC prompts. Using prompts, the Relying Party (RP) can customize the authentication and authorization flow to suit their specific needs and improve the user experience. [OIDC Authentication request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest) server.
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/519))
* Add boundary_auth_method data source
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/505))
* Add boundary_group data source
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/503))
* Add boundary_account data source
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/493))
* Add boundary_user data source
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/468))
### Bug Fix
* Fix boundary_worker overwriting worker generated auth token during
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/461))
## 1.1.10 (October 11, 2023)
### New and Improved
+13 -4
View File
@@ -18,14 +18,12 @@ DOCKER_ARGS ?= -d
PG_OPTS ?=
TEST_DB_PORT ?= 5432
BOUNDARY_VERSION = $(shell go mod edit -json | jq -r '.["Require"][] | select(.Path=="github.com/hashicorp/boundary") | .["Version"]')
GOPATH ?= ~/go
GOPATH ?= $(abspath ~/go)
GOMODCACHE ?= $(GOPATH)/pkg/mod
tools:
go generate -tags tools tools/tools.go
fmtcheck:
echo "Placeholder"
go install github.com/hashicorp/copywrite@v0.15.0
test:
echo "Placeholder"
@@ -81,3 +79,14 @@ test-database-down:
docker rm -v boundary-sql-tests || true
.PHONY: testacc tools docs test-database-up test-database-down
.PHONY: copywrite
copywrite:
copywrite headers
.PHONY: fmt
fmt:
gofumpt -w $$(find . -name '*.go')
.PHONY: gen
gen: docs copywrite fmt
+37 -27
View File
@@ -1,18 +1,15 @@
![](boundary.png)
Terraform Provider Boundary
==================
# Terraform Provider Boundary
Available in the [Terraform Registry](https://registry.terraform.io/providers/hashicorp/boundary/latest).
Requirements
------------
## Requirements
- [Terraform](https://www.terraform.io/downloads.html) >= 0.12.x
- [Go](https://golang.org/doc/install) >= 1.20
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.x
- [Go](https://golang.org/doc/install) >= 1.21
Building The Provider
---------------------
## Building The Provider
1. Clone the repository
1. Enter the repository directory
@@ -22,32 +19,30 @@ You'll need to ensure that your Terraform file contains the information necessar
```hcl
terraform {
required_providers {
boundary = {
source = "localhost/providers/boundary"
version = "0.0.1"
}
}
required_providers {
boundary = {
source = "localhost/providers/boundary"
version = "0.0.1"
}
}
}
```
Adding Dependencies
---------------------
## Adding Dependencies
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
Please see the Go documentation for the most up to date information about using Go modules.
To add a new dependency `github.com/author/dependency` to your Terraform provider:
```
```shell
go get github.com/author/dependency
go mod tidy
```
Then commit the changes to `go.mod` and `go.sum`.
Developing the Provider
---------------------------
## Developing the Provider
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).
@@ -72,17 +67,32 @@ $ make testacc
For more details on the docker image and troubleshooting see the
[boundary testing doc](https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md#testing).
Generating Docs
----------------------
## Debugging the provider
If you're using vscode, this provider has delve debugging baked into the [.vscode](https://github.com/hashicorp/terraform-provider-boundary/tree/main/.vscode) directory. To debug you can find instructions [here.](https://dev.to/drewmullen/vscode-terraform-provider-development-setup-debugging-6bn#usage)
## Generating Docs
This provider uses the [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/) tool to generate documentation. Each resource and data source requires a set of examples [examples](https://github.com/hashicorp/terraform-provider-boundary/tree/main/examples) then you execute a binary to generate the docs which are placed in [./docs](https://github.com/hashicorp/terraform-provider-boundary/tree/main/docs). Optionally, you can specify your own [templates](https://github.com/hashicorp/terraform-provider-boundary/tree/main/templates) for a resource or data source if you want to add custom information (example: [data "boundary_scope"](https://github.com/hashicorp/terraform-provider-boundary/blob/main/templates/data-sources/scope.md.tmpl#L11))
### New Resources & Data Sources (documentation templates)
If you're adding a new resource or a data source, you must include a documentation template for your new R/DS in [./templates](https://github.com/hashicorp/terraform-provider-boundary/tree/main/templates) directory. This provider uses the [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/) tool to generate documentation. For full details see the link.
### Documentation Examples for Resources & Data Sources
Examples are required for all resources and data sources. This provider uses the [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/) tool to generate documentation. To add examples, add a new file to the [./examples](https://github.com/hashicorp/terraform-provider-boundary/tree/main/examples) directory or update the existing files. Next make sure the corresponding template in [./templates](https://github.com/hashicorp/terraform-provider-boundary/tree/main/templates) directory references this example.
### Generating
From the root of the repo run:
```
```shell
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
```
Using the provider
----------------------
## Using the provider
Please see our detailed docs for individual resource usage. Below is a complex example using the Boundary provider to configure all resource types available:
```hcl
@@ -140,7 +150,7 @@ resource "boundary_user" "users" {
scope_id = boundary_scope.corp.id
}
// organization level group for readonly users
// organization level group for readonly users
resource "boundary_group" "readonly" {
name = "readonly"
description = "Organization group for readonly users"
@@ -153,7 +163,7 @@ resource "boundary_role" "organization_readonly" {
name = "readonly"
description = "Read-only role"
principal_ids = [boundary_group.readonly_users.id]
grant_strings = ["id=*;type=*;actions=read"]
grant_strings = ["ids=*;type=*;actions=read"]
scope_id = boundary_scope.corp.id
}
@@ -164,7 +174,7 @@ resource "boundary_role" "organization_admin" {
principal_ids = concat(
[for user in boundary_user.user: user.id]
)
grant_strings = ["id=*;type=*;actions=create,read,update,delete"]
grant_strings = ["ids=*;type=*;actions=create,read,update,delete"]
scope_id = boundary_scope.corp.id
}
+47
View File
@@ -0,0 +1,47 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_account Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
The boundary_account data source allows you to find a Boundary account.
---
# boundary_account (Data Source)
The boundary_account data source allows you to find a Boundary account.
## Example Usage
```terraform
# Retrieve the ID of a Boundary account
data "boundary_account" "admin" {
name = "admin"
auth_method_id = "ampw_1234567890"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `auth_method_id` (String) The auth method ID that will be queried for the account.
- `name` (String) The name of the account to retrieve.
### Read-Only
- `description` (String) The description of the retrieved account.
- `id` (String) The ID of the retrieved account.
- `scope` (List of Object) (see [below for nested schema](#nestedatt--scope))
- `type` (String) The type of the account
<a id="nestedatt--scope"></a>
### Nested Schema for `scope`
Read-Only:
- `description` (String)
- `id` (String)
- `name` (String)
- `parent_scope_id` (String)
- `type` (String)
+60
View File
@@ -0,0 +1,60 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_auth_method Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
The boundaryauthmethod data source allows you to find a Boundary auth method.
---
# boundary_auth_method (Data Source)
The boundary_auth_method data source allows you to find a Boundary auth method.
## Example Usage
```terraform
# Retrieve an auth method from the global scope
data "boundary_auth_method" "auth_method" {
name = "password_auth_method"
}
# Auth method from a org scope
data "boundary_scope" "org" {
name = "my-org"
scope_id = "global"
}
data "boundary_auth_method" "auth_method" {
name = "password_auth_method"
scope_id = data.boundary_scope.org.id
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) The name of the auth method to retrieve.
### Optional
- `scope_id` (String) The scope ID in which the resource is created. Defaults `global` if unset.
### Read-Only
- `description` (String) The description of the retrieved auth method.
- `id` (String) The ID of the retrieved auth method.
- `scope` (List of Object) (see [below for nested schema](#nestedatt--scope))
- `type` (String) The type of the auth method
<a id="nestedatt--scope"></a>
### Nested Schema for `scope`
Read-Only:
- `description` (String)
- `id` (String)
- `name` (String)
- `parent_scope_id` (String)
- `type` (String)
+60
View File
@@ -0,0 +1,60 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_group Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
The boundary_group data source allows you to find a Boundary group.
---
# boundary_group (Data Source)
The boundary_group data source allows you to find a Boundary group.
## Example Usage
```terraform
# Retrieve a user from the global scope
data "boundary_group" "global_group" {
name = "admin"
}
# User from an org scope
data "boundary_scope" "org" {
name = "org"
scope_id = "global"
}
data "boundary_group" "org_group" {
name = "username"
scope_id = data.boundary_scope.org.id
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) The name of the group to retrieve.
### Optional
- `scope_id` (String) The scope ID in which the resource is created. Defaults `global` if unset.
### Read-Only
- `description` (String) The description of the retrieved group.
- `id` (String) The ID of the retrieved group.
- `member_ids` (Set of String) Resource IDs for group members, these are most likely boundary users.
- `scope` (List of Object) (see [below for nested schema](#nestedatt--scope))
<a id="nestedatt--scope"></a>
### Nested Schema for `scope`
Read-Only:
- `description` (String)
- `id` (String)
- `name` (String)
- `parent_scope_id` (String)
- `type` (String)
+3 -6
View File
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_scope Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
@@ -13,21 +12,19 @@ Please note that the Global scope will always have an id of "global", and does n
## Example Usage
Basic usage:
```terraform
# Retrieve the ID of a Boundary project
data "boundary_scope" "org" {
name = "SecOps"
parent_scope_id = "global"
scope_id = "global"
}
data "boundary_scope" "project" {
name = "2111"
parent_scope_id = data.boundary_scope.id
scope_id = data.boundary_scope.id
}
```
<!-- schema generated by tfplugindocs -->
## Schema
+63
View File
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_user Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
The user data source allows you to find a Boundary user.
---
# boundary_user (Data Source)
The user data source allows you to find a Boundary user.
## Example Usage
```terraform
# Retrieve a user from the global scope
data "boundary_user" "global_scope_admin" {
name = "admin"
}
# User from a org scope
data "boundary_user" "org_user" {
name = "username"
scope_id = data.boundary_scope.org.id
}
data "boundary_scope" "org" {
name = "my-org"
scope_id = data.boundary_scope.org.id
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) The username to search for.
### Optional
- `scope_id` (String) The scope ID in which the resource is created. Defaults `global` if unset.
### Read-Only
- `account_ids` (Set of String) Account ID's to associate with this user resource.
- `authorized_actions` (List of String) A list of actions that the worker is entitled to perform.
- `description` (String) The user description.
- `id` (String) The ID of the user.
- `login_name` (String) Login name for user.
- `primary_account_id` (String) Primary account ID.
- `scope` (List of Object) (see [below for nested schema](#nestedatt--scope))
<a id="nestedatt--scope"></a>
### Nested Schema for `scope`
Read-Only:
- `description` (String)
- `id` (String)
- `name` (String)
- `parent_scope_id` (String)
- `type` (String)
+45
View File
@@ -10,7 +10,44 @@ description: |-
The account resource allows you to configure a Boundary account.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
resource "boundary_account_ldap" "einstein" {
auth_method_id = boundary_auth_method_ldap.forumsys_ldap.id
login_name = "einstein"
name = "einstein"
}
resource "boundary_user" "einstein" {
name = "einstein"
description = "User resource for einstein"
scope_id = "global"
account_ids = [boundary_account_ldap.einstein.id]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
@@ -29,3 +66,11 @@ The account resource allows you to configure a Boundary account.
### Read-Only
- `id` (String) The ID of the account.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_account_ldap.foo <my-id>
```
+106
View File
@@ -0,0 +1,106 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_alias_target Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The target alias resource allows you to configure a Boundary target alias.
---
# boundary_alias_target (Resource)
The target alias resource allows you to configure a Boundary target alias.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "global scope"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}
resource "boundary_host_catalog_static" "foo" {
name = "test"
description = "test catalog"
scope_id = boundary_scope.project.id
}
resource "boundary_host_static" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog_static.foo.id
address = "10.0.0.1"
}
resource "boundary_host_static" "bar" {
name = "bar"
host_catalog_id = boundary_host_catalog_static.foo.id
address = "127.0.0.1"
}
resource "boundary_host_set_static" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog_static.foo.id
host_ids = [
boundary_host_static.foo.id,
boundary_host_static.bar.id,
]
}
resource "boundary_target" "foo" {
name = "foo"
description = "Foo target"
type = "tcp"
default_port = "22"
scope_id = boundary_scope.project.id
host_source_ids = [
boundary_host_set_static.foo.id,
]
}
resource "boundary_alias_target" "example_alias_target" {
name = "example_alias_target"
description = "Example alias to target foo using host boundary_host_static.bar"
scope_id = "global"
value = "example.bar.foo.boundary"
destination_id = boundary_target.foo.id
authorize_session_host_id = boundary_host_static.bar.id
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `scope_id` (String) The scope ID.
- `value` (String) The value of the alias.
### Optional
- `authorize_session_host_id` (String) The host id to pass to Boundary when performing an authorize session action.
- `description` (String) The alias description.
- `destination_id` (String) The destination of the alias.
- `name` (String) The alias name. Defaults to the resource name.
- `type` (String) The type of alias; hardcoded.
### Read-Only
- `id` (String) The ID of the account.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_alias_target.example_alias_target <my-id>
```
+32
View File
@@ -10,7 +10,31 @@ description: |-
The LDAP auth method resource allows you to configure a Boundary auth_method_ldap.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
```
<!-- schema generated by tfplugindocs -->
## Schema
@@ -54,3 +78,11 @@ The LDAP auth method resource allows you to configure a Boundary auth_method_lda
### Read-Only
- `id` (String) The ID of the auth method.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_auth_method_ldap.foo <my-id>
```
+54
View File
@@ -10,7 +10,52 @@ description: |-
The OIDC auth method resource allows you to configure a Boundary auth_method_oidc.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_oidc" "vault" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method for Vault"
issuer = "https://XO-XO-XO-XO-XOXOXO.vault.hashicorp.cloud:8200/v1/identity/oidc/provider/my-provider"
scope_id = "global"
signing_algorithms = ["RS256"]
type = "oidc"
}
resource "boundary_auth_method_oidc" "oidc_with_one_prompt" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method With Prompt"
issuer = "https://sts.windows.net/TENANT_ID/"
scope_id = "global"
signing_algorithms = ["RS256"]
prompts = ["select_account"]
type = "oidc"
}
resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method With Multiple Prompts"
issuer = "https://sts.windows.net/TENANT_ID/"
scope_id = "global"
signing_algorithms = ["RS256"]
prompts = ["consent", "select_account"]
type = "oidc"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
@@ -36,6 +81,7 @@ The OIDC auth method resource allows you to configure a Boundary auth_method_oid
- `issuer` (String) The issuer corresponding to the provider, which must match the issuer field in generated tokens.
- `max_age` (Number) The max age to provide to the provider, indicating how much time is allowed to have passed since the last authentication before the user is challenged again. A value of 0 sets an immediate requirement for all users to reauthenticate, and an unset maxAge results in a Terraform value of -1 and the default TTL of the chosen OIDC will be used.
- `name` (String) The auth method name. Defaults to the resource name.
- `prompts` (List of String) The prompts passed to the identity provider to determine whether to prompt the end-user for reauthentication, account selection or consent. Please note the values passed are case-sensitive. The valid values are: `none`, `login`, `consent` and `select_account`.
- `signing_algorithms` (List of String) Allowed signing algorithms for the provider's issued tokens.
- `state` (String) Can be one of 'inactive', 'active-private', or 'active-public'. Currently automatically set to active-public.
- `type` (String) The type of auth method; hardcoded.
@@ -43,3 +89,11 @@ The OIDC auth method resource allows you to configure a Boundary auth_method_oid
### Read-Only
- `id` (String) The ID of the auth method.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_auth_method_oidc.foo <my-id>
```
@@ -89,6 +89,7 @@ resource "boundary_credential_library_vault_ssh_certificate" "baz" {
### Optional
- `additional_valid_principals` (List of String) Principals to be signed as "valid_principles" in addition to username.
- `critical_options` (Map of String) Specifies a map of the critical options that the certificate should be signed for.
- `description` (String) The Vault credential library description.
- `extensions` (Map of String) Specifies a map of the extensions that the certificate should be signed for.
-2
View File
@@ -39,7 +39,6 @@ resource "boundary_host" "first" {
description = "My first host!"
address = "10.0.0.1"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host" "second" {
@@ -48,7 +47,6 @@ resource "boundary_host" "second" {
description = "My second host!"
address = "10.0.0.2"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host_set" "web" {
+39
View File
@@ -10,7 +10,38 @@ description: |-
The managed group resource allows you to configure a Boundary group.
## Example Usage
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
resource "boundary_managed_group_ldap" "forumsys_scientists" {
name = "scientists"
description = "forumsys scientists managed group"
auth_method_id = boundary_auth_method_ldap.forumsys_ldap.id
group_names = ["Scientists"]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
@@ -28,3 +59,11 @@ The managed group resource allows you to configure a Boundary group.
### Read-Only
- `id` (String) The ID of the group.
## Import
Import is supported using the following syntax:
```shell
terraform import boundary_managed_group_ldap.foo <my-id>
```
+33
View File
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_policy_storage Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The storage policy resource allows you to configure a Boundary storage policy. Storage policies allow an admin to configure how long session recordings must be stored and when to delete them. Storage policies must be applied to the global scope or an org scope in order to take effect.
---
# boundary_policy_storage (Resource)
The storage policy resource allows you to configure a Boundary storage policy. Storage policies allow an admin to configure how long session recordings must be stored and when to delete them. Storage policies must be applied to the global scope or an org scope in order to take effect.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `scope_id` (String) The scope for this policy.
### Optional
- `delete_after_days` (Number) The number of days after which a session recording will be automatically deleted. Defaults to 0: never automatically delete. However, delete_after_days and retain_for_days cannot both be 0.
- `delete_after_overridable` (Boolean) Whether or not the associated delete_after_days value can be overridden by org scopes. Note: if the associated delete_after_days value is 0, overridable is ignored
- `description` (String) The policy description.
- `name` (String) The policy name. Defaults to the resource name.
- `retain_for_days` (Number) The number of days a session recording is required to be stored. Defaults to 0: allow deletions at any time. However, retain_for_days and delete_after_days cannot both be 0.
- `retain_for_overridable` (Boolean) Whether or not the associated retain_for_days value can be overridden by org scopes. Note: if the associated retain_for_days value is 0, overridable is ignored.
### Read-Only
- `id` (String) The ID of the policy.
+4 -3
View File
@@ -79,7 +79,7 @@ resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principal_ids = [boundary_user.readonly.id]
grant_strings = ["id=*;type=*;actions=read"]
grant_strings = ["ids=*;type=*;actions=read"]
scope_id = boundary_scope.org.id
}
```
@@ -112,7 +112,7 @@ resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principal_ids = [boundary_user.readonly.id]
grant_strings = ["id=*;type=*;actions=read"]
grant_strings = ["ids=*;type=*;actions=read"]
scope_id = boundary_scope.project.id
}
```
@@ -127,7 +127,8 @@ resource "boundary_role" "readonly" {
### Optional
- `description` (String) The role description.
- `grant_scope_id` (String)
- `grant_scope_id` (String, Deprecated) For Boundary 0.15+, use `grant_scope_ids` instead. The scope for which the grants in the role should apply.
- `grant_scope_ids` (Set of String) A list of scopes for which the grants in this role should apply, which can include the special values "this", "children", or "descendants"
- `grant_strings` (Set of String) A list of stringified grants for the role.
- `name` (String) The role name. Defaults to the resource name.
- `principal_ids` (Set of String) A list of principal (user or group) IDs to add as principals on the role.
+4 -4
View File
@@ -53,10 +53,10 @@ resource "boundary_scope" "org" {
}
resource "boundary_role" "org_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org.id
grant_strings = ["id=*;type=*;actions=*"]
principal_ids = ["u_auth"]
scope_id = boundary_scope.global.id
grant_scope_ids = [boundary_scope.org.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
```
+25
View File
@@ -0,0 +1,25 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_scope_policy_attachment Resource - terraform-provider-boundary"
subcategory: ""
description: |-
---
# boundary_scope_policy_attachment (Resource)
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `policy_id` (String)
- `scope_id` (String)
### Read-Only
- `id` (String) The ID of this resource.
+20 -3
View File
@@ -21,8 +21,8 @@ resource "boundary_scope" "org" {
auto_create_default_role = true
}
resource "boundary_storage_bucket" "aws_example" {
name = "My aws storage bucket"
resource "boundary_storage_bucket" "aws_static_credentials_example" {
name = "My aws storage bucket with static credentials"
description = "My first storage bucket!"
scope_id = boundary_scope.org.id
plugin_name = "aws"
@@ -37,6 +37,23 @@ resource "boundary_storage_bucket" "aws_example" {
})
worker_filter = "\"pki\" in \"/tags/type\""
}
resource "boundary_storage_bucket" "aws_dynamic_credentials_example" {
name = "My aws storage bucket with dynamic credentials"
description = "My first storage bucket!"
scope_id = boundary_scope.org.id
plugin_name = "aws"
bucket_name = "mybucket"
# the role_arn value should be the same arn used as the instance profile that is attached to the ec2 instance
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html
attributes_json = jsonencode({
"region" = "us-east-1"
"role_arn" = "arn:aws:iam::123456789012:role/S3Access"
"disable_credential_rotation" = "true"
})
worker_filter = "\"pki\" in \"/tags/type\""
}
```
<!-- schema generated by tfplugindocs -->
@@ -46,7 +63,6 @@ resource "boundary_storage_bucket" "aws_example" {
- `bucket_name` (String) The name of the bucket within the external object store service.
- `scope_id` (String) The scope for this storage bucket.
- `secrets_json` (String, Sensitive) The secrets for the storage bucket. Either values encoded with the "jsonencode" function, pre-escaped JSON string, or a file:// or env:// path. Set to a string "null" to clear any existing values. NOTE: Unlike "attributes_json", removing this block will NOT clear secrets from the storage bucket; this allows injecting secrets for one call, then removing them for storage.
- `worker_filter` (String) Filters to the worker(s) that can handle requests for this storage bucket. The filter must match an existing worker in order to create a storage bucket.
### Optional
@@ -57,6 +73,7 @@ resource "boundary_storage_bucket" "aws_example" {
- `name` (String) The storage bucket name. Defaults to the resource name.
- `plugin_id` (String) The ID of the plugin that should back the resource. This or plugin_name must be defined.
- `plugin_name` (String) The name of the plugin that should back the resource. This or plugin_id must be defined.
- `secrets_json` (String, Sensitive) The secrets for the storage bucket. Either values encoded with the "jsonencode" function, pre-escaped JSON string, or a file:// or env:// path. Set to a string "null" to clear any existing values. NOTE: Unlike "attributes_json", removing this block will NOT clear secrets from the storage bucket; this allows injecting secrets for one call, then removing them for storage.
### Read-Only
-2
View File
@@ -61,7 +61,6 @@ resource "boundary_host" "foo" {
type = "static"
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
@@ -69,7 +68,6 @@ resource "boundary_host" "bar" {
type = "static"
name = "bar"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
@@ -0,0 +1,5 @@
# Retrieve the ID of a Boundary account
data "boundary_account" "admin" {
name = "admin"
auth_method_id = "ampw_1234567890"
}
@@ -0,0 +1,15 @@
# Retrieve an auth method from the global scope
data "boundary_auth_method" "auth_method" {
name = "password_auth_method"
}
# Auth method from a org scope
data "boundary_scope" "org" {
name = "my-org"
scope_id = "global"
}
data "boundary_auth_method" "auth_method" {
name = "password_auth_method"
scope_id = data.boundary_scope.org.id
}
@@ -0,0 +1,15 @@
# Retrieve a user from the global scope
data "boundary_group" "global_group" {
name = "admin"
}
# User from an org scope
data "boundary_scope" "org" {
name = "org"
scope_id = "global"
}
data "boundary_group" "org_group" {
name = "username"
scope_id = data.boundary_scope.org.id
}
@@ -1,10 +1,10 @@
# Retrieve the ID of a Boundary project
data "boundary_scope" "org" {
name = "SecOps"
parent_scope_id = "global"
scope_id = "global"
}
data "boundary_scope" "project" {
name = "2111"
parent_scope_id = data.boundary_scope.id
}
scope_id = data.boundary_scope.id
}
@@ -0,0 +1,15 @@
# Retrieve a user from the global scope
data "boundary_user" "global_scope_admin" {
name = "admin"
}
# User from a org scope
data "boundary_user" "org_user" {
name = "username"
scope_id = data.boundary_scope.org.id
}
data "boundary_scope" "org" {
name = "my-org"
scope_id = data.boundary_scope.org.id
}
@@ -0,0 +1 @@
terraform import boundary_account_ldap.foo <my-id>
@@ -0,0 +1,34 @@
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
resource "boundary_account_ldap" "einstein" {
auth_method_id = boundary_auth_method_ldap.forumsys_ldap.id
login_name = "einstein"
name = "einstein"
}
resource "boundary_user" "einstein" {
name = "einstein"
description = "User resource for einstein"
scope_id = "global"
account_ids = [boundary_account_ldap.einstein.id]
}
@@ -0,0 +1 @@
terraform import boundary_alias_target.example_alias_target <my-id>
@@ -0,0 +1,62 @@
resource "boundary_scope" "org" {
name = "organization_one"
description = "global scope"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}
resource "boundary_host_catalog_static" "foo" {
name = "test"
description = "test catalog"
scope_id = boundary_scope.project.id
}
resource "boundary_host_static" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog_static.foo.id
address = "10.0.0.1"
}
resource "boundary_host_static" "bar" {
name = "bar"
host_catalog_id = boundary_host_catalog_static.foo.id
address = "127.0.0.1"
}
resource "boundary_host_set_static" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog_static.foo.id
host_ids = [
boundary_host_static.foo.id,
boundary_host_static.bar.id,
]
}
resource "boundary_target" "foo" {
name = "foo"
description = "Foo target"
type = "tcp"
default_port = "22"
scope_id = boundary_scope.project.id
host_source_ids = [
boundary_host_set_static.foo.id,
]
}
resource "boundary_alias_target" "example_alias_target" {
name = "example_alias_target"
description = "Example alias to target foo using host boundary_host_static.bar"
scope_id = "global"
value = "example.bar.foo.boundary"
destination_id = boundary_target.foo.id
authorize_session_host_id = boundary_host_static.bar.id
}
@@ -0,0 +1 @@
terraform import boundary_auth_method_ldap.foo <my-id>
@@ -0,0 +1,21 @@
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
@@ -0,0 +1 @@
terraform import boundary_auth_method_oidc.foo <my-id>
@@ -0,0 +1,42 @@
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_oidc" "vault" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method for Vault"
issuer = "https://XO-XO-XO-XO-XOXOXO.vault.hashicorp.cloud:8200/v1/identity/oidc/provider/my-provider"
scope_id = "global"
signing_algorithms = ["RS256"]
type = "oidc"
}
resource "boundary_auth_method_oidc" "oidc_with_one_prompt" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method With Prompt"
issuer = "https://sts.windows.net/TENANT_ID/"
scope_id = "global"
signing_algorithms = ["RS256"]
prompts = ["select_account"]
type = "oidc"
}
resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
client_id = "eieio"
client_secret = "hvo_secret_XO"
description = "My Boundary OIDC Auth Method With Multiple Prompts"
issuer = "https://sts.windows.net/TENANT_ID/"
scope_id = "global"
signing_algorithms = ["RS256"]
prompts = ["consent", "select_account"]
type = "oidc"
}
@@ -24,7 +24,6 @@ resource "boundary_host" "first" {
description = "My first host!"
address = "10.0.0.1"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host" "second" {
@@ -33,7 +32,6 @@ resource "boundary_host" "second" {
description = "My second host!"
address = "10.0.0.2"
host_catalog_id = boundary_host_catalog.static.id
scope_id = boundary_scope.project.id
}
resource "boundary_host_set" "web" {
@@ -0,0 +1 @@
terraform import boundary_managed_group_ldap.foo <my-id>
@@ -0,0 +1,28 @@
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_auth_method_ldap" "forumsys_ldap" {
name = "forumsys public LDAP"
scope_id = "global" # add the new auth method to the global scope
urls = ["ldap://ldap.forumsys.com"] # the addr of the LDAP server
user_dn = "dc=example,dc=com" # the basedn for users
user_attr = "uid" # the user attribute
group_dn = "dc=example,dc=com" # the basedn for groups
bind_dn = "cn=read-only-admin,dc=example,dc=com" # the dn to use when binding
bind_password = "password" # passwd to use when binding
state = "active-public" # make sure the new auth-method is available to everyone
enable_groups = true # this turns-on the discovery of a user's groups
discover_dn = true # this turns-on the discovery of an authenticating user's dn
}
resource "boundary_managed_group_ldap" "forumsys_scientists" {
name = "scientists"
description = "forumsys scientists managed group"
auth_method_id = boundary_auth_method_ldap.forumsys_ldap.id
group_names = ["Scientists"]
}
@@ -0,0 +1,27 @@
resource "boundary_scope" "global" {
global_scope = true
scope_id = "global"
}
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_policy_storage" "foo" {
name = "foo"
description = "Foo policy"
scope_id = boundary_scope.org.id
retain_for_days = 10
retain_for_overridable = false
delete_after_days = 10
delete_after_overridable = true
}
resource "boundary_scope_policy_attachment" "foo_attachment" {
scope_id = boundary_scope.org.id
policy_id = boundary_policy_storage.foo.id
}
@@ -23,6 +23,6 @@ resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principal_ids = [boundary_user.readonly.id]
grant_strings = ["id=*;type=*;actions=read"]
grant_strings = ["ids=*;type=*;actions=read"]
scope_id = boundary_scope.project.id
}
@@ -16,6 +16,6 @@ resource "boundary_role" "readonly" {
name = "readonly"
description = "A readonly role"
principal_ids = [boundary_user.readonly.id]
grant_strings = ["id=*;type=*;actions=read"]
grant_strings = ["ids=*;type=*;actions=read"]
scope_id = boundary_scope.org.id
}
+4 -4
View File
@@ -5,8 +5,8 @@ resource "boundary_scope" "org" {
}
resource "boundary_role" "org_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org.id
grant_strings = ["id=*;type=*;actions=*"]
principal_ids = ["u_auth"]
scope_id = boundary_scope.global.id
grant_scope_ids = [boundary_scope.org.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
@@ -6,8 +6,8 @@ resource "boundary_scope" "org" {
auto_create_default_role = true
}
resource "boundary_storage_bucket" "aws_example" {
name = "My aws storage bucket"
resource "boundary_storage_bucket" "aws_static_credentials_example" {
name = "My aws storage bucket with static credentials"
description = "My first storage bucket!"
scope_id = boundary_scope.org.id
plugin_name = "aws"
@@ -22,3 +22,20 @@ resource "boundary_storage_bucket" "aws_example" {
})
worker_filter = "\"pki\" in \"/tags/type\""
}
resource "boundary_storage_bucket" "aws_dynamic_credentials_example" {
name = "My aws storage bucket with dynamic credentials"
description = "My first storage bucket!"
scope_id = boundary_scope.org.id
plugin_name = "aws"
bucket_name = "mybucket"
# the role_arn value should be the same arn used as the instance profile that is attached to the ec2 instance
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html
attributes_json = jsonencode({
"region" = "us-east-1"
"role_arn" = "arn:aws:iam::123456789012:role/S3Access"
"disable_credential_rotation" = "true"
})
worker_filter = "\"pki\" in \"/tags/type\""
}
@@ -46,7 +46,6 @@ resource "boundary_host" "foo" {
type = "static"
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
@@ -54,7 +53,6 @@ resource "boundary_host" "bar" {
type = "static"
name = "bar"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}
+123 -103
View File
@@ -1,135 +1,145 @@
module github.com/hashicorp/terraform-provider-boundary
go 1.21
go 1.22.2
require (
github.com/hashicorp/boundary v0.14.0
github.com/hashicorp/boundary/api v0.0.41
github.com/hashicorp/boundary/sdk v0.0.37
github.com/hashicorp/cap v0.4.0
github.com/hashicorp/cap/ldap v0.0.0-20230918191608-899e3f8e8cd6
github.com/YakDriver/regexache v0.23.0
github.com/hashicorp/boundary v0.16.0
github.com/hashicorp/boundary/api v0.0.49
github.com/hashicorp/boundary/sdk v0.0.46
github.com/hashicorp/cap v0.5.1-0.20240315182732-faa330bfb8df
github.com/hashicorp/cap/ldap v0.0.0-20240206183135-ed8f24513744
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637
github.com/hashicorp/go-kms-wrapping/v2 v2.0.13
github.com/hashicorp/go-secure-stdlib/configutil/v2 v2.0.10
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.4
github.com/hashicorp/terraform-plugin-docs v0.16.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0
github.com/jimlambrt/gldap v0.1.7
github.com/hashicorp/go-kms-wrapping/v2 v2.0.17-0.20240313190905-91d44aa8e360
github.com/hashicorp/go-secure-stdlib/configutil/v2 v2.0.11
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.7
github.com/hashicorp/terraform-plugin-docs v0.18.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
github.com/jimlambrt/gldap v0.1.11
github.com/kr/pretty v0.3.1
github.com/mitchellh/go-homedir v1.1.0
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.14.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.21.0
mvdan.cc/gofumpt v0.6.0
)
require (
dario.cat/mergo v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/DATA-DOG/go-sqlmock v1.5.0 // indirect
github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/coreos/go-oidc/v3 v3.5.0 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v23.0.1+incompatible // indirect
github.com/docker/docker v23.0.3+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/continuity v0.4.3 // indirect
github.com/coreos/go-oidc/v3 v3.9.0 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v25.0.3+incompatible // indirect
github.com/docker/docker v26.0.2+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
github.com/glebarez/sqlite v1.10.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-ldap/ldap/v3 v3.4.6 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-migrate/migrate/v4 v4.16.2 // indirect
github.com/golang-migrate/migrate/v4 v4.17.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/dbassert v0.0.0-20230622135851-cc4c0f18f4a7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/dbassert v0.0.0-20231012105025-1bc1bd88e22b // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/eventlogger v0.2.5 // indirect
github.com/hashicorp/eventlogger/filters/encrypt v0.1.8-0.20230428153751-cca445805f24 // indirect
github.com/hashicorp/go-bexpr v0.1.12 // indirect
github.com/hashicorp/eventlogger v0.2.9 // indirect
github.com/hashicorp/eventlogger/filters/encrypt v0.1.8-0.20231208142215-efdb51ec090d // indirect
github.com/hashicorp/go-bexpr v0.1.13 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-dbw v0.1.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20230902160534-7a966e6313fd // indirect
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.4 // indirect
github.com/hashicorp/go-dbw v0.1.3-0.20240312210008-7ed943176e5b // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20231219183231-6bac757bb482 // indirect
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.7 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.5.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-rate v0.0.0-20231204194614-cc8d401f70ab // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/base62 v0.1.2 // indirect
github.com/hashicorp/go-secure-stdlib/gatedwriter v0.1.1 // indirect
github.com/hashicorp/go-secure-stdlib/kv-builder v0.1.2 // indirect
github.com/hashicorp/go-secure-stdlib/listenerutil v0.1.7 // indirect
github.com/hashicorp/go-secure-stdlib/listenerutil v0.1.9 // indirect
github.com/hashicorp/go-secure-stdlib/mlock v0.1.3 // indirect
github.com/hashicorp/go-secure-stdlib/reloadutil v0.1.1 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.5 // indirect
github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.3 // indirect
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
github.com/hashicorp/hc-install v0.6.3 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/nodeenrollment v0.2.6 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect
github.com/hashicorp/nodeenrollment v0.2.10 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.22.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/vault/api v1.9.1 // indirect
github.com/hashicorp/vault/sdk v0.3.0 // indirect
github.com/hashicorp/vault/api v1.12.0 // indirect
github.com/hashicorp/vault/sdk v0.11.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.1 // indirect
github.com/jackc/pgx/v5 v5.4.3 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
github.com/jackc/pgtype v1.14.2 // indirect
github.com/jackc/pgx/v4 v4.18.3 // indirect
github.com/jackc/pgx/v5 v5.5.5 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jefferai/go-libsecret v0.0.0-20210525195240-b53481abef97 // indirect
github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f // indirect
github.com/jefferai/keyring v1.1.7-0.20220316160357-58a74bb55891 // indirect
github.com/jinzhu/gorm v1.9.12 // indirect
github.com/jinzhu/gorm v1.9.16 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
@@ -138,58 +148,68 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/pointerstructure v1.2.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/ory/dockertest/v3 v3.9.1 // indirect
github.com/opencontainers/image-spec v1.1.0-rc6 // indirect
github.com/opencontainers/runc v1.2.0-rc.1 // indirect
github.com/ory/dockertest/v3 v3.10.0 // indirect
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sethvargo/go-diceware v0.3.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xo/dburl v0.16.0 // indirect
github.com/xo/dburl v0.21.1 // indirect
github.com/yuin/goldmark v1.6.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zalando/go-keyring v0.2.3 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
github.com/zclconf/go-cty v1.14.2 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.58.2 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 // indirect
google.golang.org/grpc v1.61.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/postgres v1.5.2 // indirect
gorm.io/driver/sqlite v1.5.3 // indirect
gorm.io/gorm v1.25.4 // indirect
gorm.io/driver/postgres v1.5.7 // indirect
gorm.io/driver/sqlite v1.5.5 // indirect
gorm.io/gorm v1.25.7 // indirect
modernc.org/libc v1.41.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.28.0 // indirect
)
+303 -671
View File
File diff suppressed because it is too large. Load diff
+14
View File
@@ -46,4 +46,18 @@ const (
internalForceUpdateKey = "internal_force_update"
// workerFilter is used for common "worker_filter" resource attribute
WorkerFilterKey = "worker_filter"
// LoginNameKey is used for common "login_name" resource attribute
LoginNameKey = "login_name"
// PrimaryAccountIdKey is used for common "primary_account_id" resource attribute
PrimaryAccountIdKey = "primary_account_id"
// ScopeKey is used for common "scope" resource attribute
ScopeKey = "scope"
// ParentScopeKey is used for common "parent_scope_id" resource attribute
ParentScopeIdKey = "parent_scope_id"
// GroupMemberIdsKey is used for common "member_ids" resource attribute
GroupMemberIdsKey = "member_ids"
// ValueKey is used for common "value" resource attribute
ValueKey = "value"
// DestinationIdKey is used for common "destination_id" resource attribute
DestinationIdKey = "destination_id"
)
+139
View File
@@ -0,0 +1,139 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"net/http"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func dataSourceAccount() *schema.Resource {
return &schema.Resource{
Description: "The boundary_account data source allows you to find a Boundary account.",
ReadContext: dataSourceAccountRead,
Schema: map[string]*schema.Schema{
NameKey: {
Description: "The name of the account to retrieve.",
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
AuthMethodIdKey: {
Description: "The auth method ID that will be queried for the account.",
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
IDKey: {
Description: "The ID of the retrieved account.",
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Description: "The description of the retrieved account.",
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Description: "The type of the account",
Type: schema.TypeString,
Computed: true,
},
ScopeKey: {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
IDKey: {
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Type: schema.TypeString,
Computed: true,
},
ParentScopeIdKey: {
Type: schema.TypeString,
Computed: true,
},
},
},
},
},
}
}
func dataSourceAccountRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
name := d.Get(NameKey).(string)
authMethodId := d.Get(AuthMethodIdKey).(string)
acl := accounts.NewClient(md.client)
accountsList, err := acl.List(ctx, authMethodId,
accounts.WithFilter(FilterWithItemNameMatches(name)),
)
if err != nil {
return diag.Errorf("error calling list account: %v", err)
}
accounts := accountsList.GetItems()
if accounts == nil {
return diag.Errorf("no accounts found")
}
if len(accounts) == 0 {
return diag.Errorf("no matching account found")
}
if len(accounts) > 1 {
return diag.Errorf("error found more than 1 account")
}
arr, err := acl.Read(ctx, accounts[0].Id)
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
d.SetId("")
return nil
}
return diag.Errorf("error calling read account: %v", err)
}
if arr == nil {
return diag.Errorf("account nil after read")
}
if err := setFromAccountRead(d, *arr.Item); err != nil {
return diag.FromErr(err)
}
return nil
}
func setFromAccountRead(d *schema.ResourceData, account accounts.Account) error {
if err := d.Set(NameKey, account.Name); err != nil {
return err
}
if err := d.Set(DescriptionKey, account.Description); err != nil {
return err
}
if err := d.Set(TypeKey, account.Type); err != nil {
return err
}
d.Set(ScopeKey, flattenScopeInfo(account.Scope))
d.SetId(account.Id)
return nil
}
@@ -0,0 +1,121 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"fmt"
"strings"
"testing"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/cap/oidc"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
var accountPasswordRead = `
data "boundary_account" "acc_password" {
depends_on = [ boundary_account_password.foo ]
name = "test"
auth_method_id = boundary_auth_method.foo.id
}`
var accountLdapRead = fmt.Sprintf(`
data "boundary_account" "acc_ldap" {
depends_on = [ boundary_account_ldap.foo ]
name = "%s"
auth_method_id = boundary_auth_method_ldap.foo.id
}`, testAccountLdapName)
var accountOidcRead = `
data "boundary_account" "acc_oidc" {
depends_on = [ boundary_account_oidc.foo ]
name = "test"
auth_method_id = boundary_auth_method_oidc.foo.id
}`
func TestAccAccountReadPassword(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, fooAccountPassword, accountPasswordRead),
Check: resource.ComposeTestCheckFunc(
testAccCheckAccountResourceExists(provider, "boundary_account_password.foo"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_password", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_password", AuthMethodIdKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_password", NameKey),
resource.TestCheckResourceAttr("data.boundary_account.acc_password", DescriptionKey, fooAccountPasswordDesc),
resource.TestCheckResourceAttr("data.boundary_account.acc_password", TypeKey, "password"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_password", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_account.acc_password", "scope.0.name", "org1"),
resource.TestCheckResourceAttr("data.boundary_account.acc_password", "scope.0.type", "org"),
),
},
},
})
}
func TestAccAccountReadLdap(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, testAccountLdap, accountLdapRead),
Check: resource.ComposeTestCheckFunc(
testAccCheckAccountResourceExists(provider, "boundary_account_ldap.foo"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_ldap", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_ldap", AuthMethodIdKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_ldap", NameKey),
resource.TestCheckResourceAttr("data.boundary_account.acc_ldap", DescriptionKey, testAccountLdapDesc),
resource.TestCheckResourceAttr("data.boundary_account.acc_ldap", TypeKey, "ldap"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_ldap", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_account.acc_ldap", "scope.0.name", "org1"),
resource.TestCheckResourceAttr("data.boundary_account.acc_ldap", "scope.0.type", "org"),
),
},
},
})
}
func TestAccAccountReadOidc(t *testing.T) {
tp := oidc.StartTestProvider(t)
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
tpCert := strings.TrimSpace(tp.CACert())
createConfig := fmt.Sprintf(fooAccountOidc, tp.Addr(), tpCert, fooAccountOidcDesc, tp.ExpectedSubject(), tp.Addr())
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, createConfig, accountOidcRead),
Check: resource.ComposeTestCheckFunc(
testAccCheckAccountResourceExists(provider, "boundary_account_oidc.foo"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_oidc", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_oidc", AuthMethodIdKey),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_oidc", NameKey),
resource.TestCheckResourceAttr("data.boundary_account.acc_oidc", DescriptionKey, fooAccountOidcDesc),
resource.TestCheckResourceAttr("data.boundary_account.acc_oidc", TypeKey, "oidc"),
resource.TestCheckResourceAttrSet("data.boundary_account.acc_oidc", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_account.acc_oidc", "scope.0.name", "org1"),
resource.TestCheckResourceAttr("data.boundary_account.acc_oidc", "scope.0.type", "org"),
),
},
},
})
}
@@ -0,0 +1,142 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"net/http"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func dataSourceAuthMethod() *schema.Resource {
return &schema.Resource{
Description: "The boundary_auth_method data source allows you to find a Boundary auth method.",
ReadContext: dataSourceAuthMethodRead,
Schema: map[string]*schema.Schema{
NameKey: {
Description: "The name of the auth method to retrieve.",
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
ScopeIdKey: {
Description: "The scope ID in which the resource is created. Defaults `global` if unset.",
Type: schema.TypeString,
Optional: true,
Default: "global",
ValidateFunc: validation.StringIsNotEmpty,
},
IDKey: {
Description: "The ID of the retrieved auth method.",
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Description: "The description of the retrieved auth method.",
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Description: "The type of the auth method",
Type: schema.TypeString,
Computed: true,
},
ScopeKey: {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
IDKey: {
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Type: schema.TypeString,
Computed: true,
},
ParentScopeIdKey: {
Type: schema.TypeString,
Computed: true,
},
},
},
},
},
}
}
func dataSourceAuthMethodRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
name := d.Get(NameKey).(string)
scopeId := d.Get(ScopeIdKey).(string)
amcl := authmethods.NewClient(md.client)
authMethodsList, err := amcl.List(ctx, scopeId,
authmethods.WithFilter(FilterWithItemNameMatches(name)),
)
if err != nil {
return diag.Errorf("error calling list auth method: %v", err)
}
authMethods := authMethodsList.GetItems()
if authMethods == nil {
return diag.Errorf("no auth methods found")
}
if len(authMethods) == 0 {
return diag.Errorf("no matching auth method found")
}
if len(authMethods) > 1 {
return diag.Errorf("error found more than 1 auth method")
}
amrr, err := amcl.Read(ctx, authMethods[0].Id)
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
d.SetId("")
return nil
}
return diag.Errorf("error calling read auth method: %v", err)
}
if amrr == nil {
return diag.Errorf("auth method nil after read")
}
if err := setFromAuthMethodRead(d, *amrr.Item); err != nil {
return diag.FromErr(err)
}
return nil
}
func setFromAuthMethodRead(d *schema.ResourceData, authMethod authmethods.AuthMethod) error {
if err := d.Set(NameKey, authMethod.Name); err != nil {
return err
}
if err := d.Set(DescriptionKey, authMethod.Description); err != nil {
return err
}
if err := d.Set(ScopeIdKey, authMethod.ScopeId); err != nil {
return err
}
if err := d.Set(TypeKey, authMethod.Type); err != nil {
return err
}
d.Set(ScopeKey, flattenScopeInfo(authMethod.Scope))
d.SetId(authMethod.Id)
return nil
}
@@ -0,0 +1,98 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"fmt"
"testing"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
testAuthMethodName = "test_auth_method"
)
var authMethodReadGlobal = fmt.Sprintf(`
resource "boundary_auth_method" "auth_method" {
name = "%s"
description = "test"
scope_id = "global"
type = "password"
depends_on = [boundary_role.org1_admin]
}
data "boundary_auth_method" "auth_method" {
depends_on = [ boundary_auth_method.auth_method ]
name = "%s"
}`, testAuthMethodName, testAuthMethodName)
var authMethodReadOrg = fmt.Sprintf(`
resource "boundary_auth_method" "auth_method" {
name = "%s"
description = "test"
scope_id = boundary_scope.org1.id
type = "password"
depends_on = [boundary_role.org1_admin]
}
data "boundary_auth_method" "auth_method" {
depends_on = [ boundary_auth_method.auth_method ]
name = "%s"
scope_id = boundary_scope.org1.id
}`, testAuthMethodName, testAuthMethodName)
func TestAccAuthMethodReadGlobal(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, authMethodReadGlobal),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", ScopeIdKey),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", NameKey, testAuthMethodName),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", TypeKey, "password"),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", DescriptionKey),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", "scope.0.name", "global"),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", "scope.0.type", "global"),
),
},
},
})
}
func TestAccAuthMethodReadOrg(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, authMethodReadOrg),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", ScopeIdKey),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", NameKey, testAuthMethodName),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", TypeKey, "password"),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", DescriptionKey),
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", "scope.0.name", "org1"),
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", "scope.0.type", "org"),
),
},
},
})
}
+144
View File
@@ -0,0 +1,144 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"net/http"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/groups"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func dataSourceGroup() *schema.Resource {
return &schema.Resource{
Description: "The boundary_group data source allows you to find a Boundary group.",
ReadContext: dataSourceGroupRead,
Schema: map[string]*schema.Schema{
NameKey: {
Description: "The name of the group to retrieve.",
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
ScopeIdKey: {
Description: "The scope ID in which the resource is created. Defaults `global` if unset.",
Type: schema.TypeString,
Optional: true,
Default: "global",
ValidateFunc: validation.StringIsNotEmpty,
},
IDKey: {
Description: "The ID of the retrieved group.",
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Description: "The description of the retrieved group.",
Type: schema.TypeString,
Computed: true,
},
ScopeKey: {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
IDKey: {
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Type: schema.TypeString,
Computed: true,
},
ParentScopeIdKey: {
Type: schema.TypeString,
Computed: true,
},
},
},
},
GroupMemberIdsKey: {
Description: "Resource IDs for group members, these are most likely boundary users.",
Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
},
}
}
func dataSourceGroupRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
name := d.Get(NameKey).(string)
scopeId := d.Get(ScopeIdKey).(string)
gcl := groups.NewClient(md.client)
groupsList, err := gcl.List(ctx, scopeId,
groups.WithFilter(FilterWithItemNameMatches(name)),
)
if err != nil {
return diag.Errorf("error calling list group: %v", err)
}
groups := groupsList.GetItems()
if groups == nil {
return diag.Errorf("no groups found")
}
if len(groups) == 0 {
return diag.Errorf("no matching group found")
}
if len(groups) > 1 {
return diag.Errorf("error found more than 1 group")
}
grr, err := gcl.Read(ctx, groups[0].Id)
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
d.SetId("")
return nil
}
return diag.Errorf("error calling read group: %v", err)
}
if grr == nil {
return diag.Errorf("group nil after read")
}
if err := setFromGroupRead(d, *grr.Item); err != nil {
return diag.FromErr(err)
}
return nil
}
func setFromGroupRead(d *schema.ResourceData, group groups.Group) error {
if err := d.Set(NameKey, group.Name); err != nil {
return err
}
if err := d.Set(DescriptionKey, group.Description); err != nil {
return err
}
if err := d.Set(ScopeIdKey, group.ScopeId); err != nil {
return err
}
if err := d.Set(GroupMemberIdsKey, group.MemberIds); err != nil {
return err
}
d.Set(ScopeKey, flattenScopeInfo(group.Scope))
d.SetId(group.Id)
return nil
}
+113
View File
@@ -0,0 +1,113 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"fmt"
"testing"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
testGroupName = "test_group"
)
var groupReadGlobal = fmt.Sprintf(`
resource "boundary_user" "user" {
description = "user"
scope_id = "global"
depends_on = [boundary_role.org1_admin]
}
resource "boundary_group" "group" {
name = "%s"
description = "test"
scope_id = "global"
member_ids = [boundary_user.user.id]
depends_on = [boundary_user.user]
}
data "boundary_group" "group" {
depends_on = [ boundary_group.group ]
name = "%s"
}`, testGroupName, testGroupName)
var groupReadOrg = fmt.Sprintf(`
resource "boundary_user" "user" {
description = "user"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
}
resource "boundary_group" "group" {
name = "%s"
description = "test"
scope_id = boundary_scope.org1.id
member_ids = [boundary_user.user.id]
depends_on = [boundary_user.user]
}
data "boundary_group" "group" {
depends_on = [ boundary_group.group ]
name = "%s"
scope_id = boundary_scope.org1.id
}`, testGroupName, testGroupName)
func TestAccGroupReadGlobal(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, groupReadGlobal),
Check: resource.ComposeTestCheckFunc(
testAccCheckGroupResourceExists(provider, "boundary_group.group"),
resource.TestCheckResourceAttrSet("data.boundary_group.group", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_group.group", ScopeIdKey),
resource.TestCheckResourceAttr("data.boundary_group.group", NameKey, testGroupName),
resource.TestCheckResourceAttrSet("data.boundary_group.group", DescriptionKey),
resource.TestCheckResourceAttrSet("data.boundary_group.group", fmt.Sprintf("%s.#", GroupMemberIdsKey)),
resource.TestCheckResourceAttrSet("data.boundary_group.group", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_group.group", "scope.0.name", "global"),
resource.TestCheckResourceAttr("data.boundary_group.group", "scope.0.type", "global"),
),
},
},
})
}
func TestAccGroupReadOrg(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfig(url, fooOrg, groupReadOrg),
Check: resource.ComposeTestCheckFunc(
testAccCheckGroupResourceExists(provider, "boundary_group.group"),
resource.TestCheckResourceAttrSet("data.boundary_group.group", IDKey),
resource.TestCheckResourceAttrSet("data.boundary_group.group", ScopeIdKey),
resource.TestCheckResourceAttr("data.boundary_group.group", NameKey, testGroupName),
resource.TestCheckResourceAttrSet("data.boundary_group.group", DescriptionKey),
resource.TestCheckResourceAttrSet("data.boundary_group.group", fmt.Sprintf("%s.#", GroupMemberIdsKey)),
resource.TestCheckResourceAttrSet("data.boundary_group.group", "scope.0.id"),
resource.TestCheckResourceAttr("data.boundary_group.group", "scope.0.name", "org1"),
resource.TestCheckResourceAttr("data.boundary_group.group", "scope.0.type", "org"),
),
},
},
})
}
+4 -1
View File
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
@@ -62,7 +65,7 @@ func dataSourceScopeRead(ctx context.Context, d *schema.ResourceData, meta inter
scpls, err := scp.List(ctx, scopeId, opts...)
if err != nil {
return diag.Errorf("error calling read scope: %v", err)
return diag.Errorf("error calling list scope: %v", err)
}
if scpls == nil {
return diag.Errorf("no scopes found")
+5 -2
View File
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
@@ -39,8 +42,8 @@ resource "boundary_scope" "project" {
resource "boundary_role" "org_admin" {
scope_id = "global"
grant_scope_id = boundary_scope.org.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.org.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
+161
View File
@@ -0,0 +1,161 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"github.com/hashicorp/boundary/api/users"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func dataSourceUser() *schema.Resource {
return &schema.Resource{
Description: "The user data source allows you to find a Boundary user.",
ReadContext: dataSourceUserRead,
Schema: map[string]*schema.Schema{
IDKey: {
Description: "The ID of the user.",
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Description: "The username to search for.",
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsNotEmpty,
},
DescriptionKey: {
Description: "The user description.",
Type: schema.TypeString,
Computed: true,
},
ScopeIdKey: {
Description: "The scope ID in which the resource is created. Defaults `global` if unset.",
Type: schema.TypeString,
Optional: true,
Default: "global",
ValidateFunc: validation.StringIsNotEmpty,
},
userAccountIDsKey: {
Description: "Account ID's to associate with this user resource.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
ScopeKey: {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
IDKey: {
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Type: schema.TypeString,
Computed: true,
},
TypeKey: {
Type: schema.TypeString,
Computed: true,
},
DescriptionKey: {
Type: schema.TypeString,
Computed: true,
},
ParentScopeIdKey: {
Type: schema.TypeString,
Computed: true,
},
},
},
},
authorizedActions: {
Description: "A list of actions that the worker is entitled to perform.",
Type: schema.TypeList,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Computed: true,
},
LoginNameKey: {
Description: "Login name for user.",
Type: schema.TypeString,
Computed: true,
},
PrimaryAccountIdKey: {
Description: "Primary account ID.",
Type: schema.TypeString,
Computed: true,
},
},
}
}
func dataSourceUserRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
usrs := users.NewClient(md.client)
opts := []users.Option{}
// Get user ID using name
name := d.Get(NameKey).(string)
scopeID := d.Get(ScopeIdKey).(string)
opts = append(opts, users.WithFilter(FilterWithItemNameMatches(name)))
usersList, err := usrs.List(ctx, scopeID, opts...)
if err != nil {
return diag.Errorf("error calling list user: %v", err)
}
users := usersList.GetItems()
// check length, 0 means no user, > 1 means too many
if len(users) == 0 {
return diag.Errorf("no matching user found: %v", err)
}
if len(users) > 1 {
return diag.Errorf("error found more than 1 user: %v", err)
}
if err := setFromUserItem(d, *users[0]); err != nil {
return diag.FromErr(err)
}
return nil
}
func setFromUserItem(d *schema.ResourceData, user users.User) error {
if err := d.Set(NameKey, user.Name); err != nil {
return err
}
if err := d.Set(DescriptionKey, user.Description); err != nil {
return err
}
if err := d.Set(ScopeIdKey, user.ScopeId); err != nil {
return err
}
if err := d.Set(userAccountIDsKey, user.AccountIds); err != nil {
return err
}
if err := d.Set(authorizedActions, user.AuthorizedActions); err != nil {
return err
}
if err := d.Set(LoginNameKey, user.LoginName); err != nil {
return err
}
if err := d.Set(PrimaryAccountIdKey, user.PrimaryAccountId); err != nil {
return err
}
d.Set(ScopeKey, flattenScopeInfo(user.Scope))
d.SetId(user.Id)
return nil
}
@@ -0,0 +1,95 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"fmt"
"testing"
"github.com/YakDriver/regexache"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
var (
orgUserDataSource = fmt.Sprintf(`
resource "boundary_user" "org1" {
name = "test"
description = "%s"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
}
data "boundary_user" "org1" {
name = "test"
scope_id = boundary_scope.org1.id
depends_on = [boundary_user.org1]
}`, fooDescription)
globalUserDataSource = `
data "boundary_user" "admin" {
name = "admin"
depends_on = [boundary_role.org1_admin]
}`
)
// NOTE: this test also tests out the direct token auth mechanism.
func TestAccUserDataSource_basicOrgUser(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
token := tc.Token().Token
resourceName := "boundary_user.org1"
dataSourceName := "data.boundary_user.org1"
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
CheckDestroy: testAccCheckUserResourceDestroy(t, provider),
Steps: []resource.TestStep{
{
// test create
Config: testConfigWithToken(url, token, fooOrg, orgUserDataSource),
Check: resource.ComposeTestCheckFunc(
testAccCheckUserResourceExists(provider, resourceName),
resource.TestCheckResourceAttr(dataSourceName, DescriptionKey, fooDescription),
resource.TestCheckResourceAttr(dataSourceName, NameKey, "test"),
),
},
},
})
}
func TestAccUserDataSource_globalAdminUser(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
token := tc.Token().Token
dataSourceName := "data.boundary_user.admin"
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
Steps: []resource.TestStep{
{
Config: testConfigWithToken(url, token, fooOrg, globalUserDataSource),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(dataSourceName, NameKey, "admin"),
resource.TestCheckResourceAttr(dataSourceName, DescriptionKey, "Initial admin user within the \"global\" scope"),
resource.TestCheckResourceAttr(dataSourceName, LoginNameKey, "testuser"),
resource.TestMatchResourceAttr(dataSourceName, IDKey, regexache.MustCompile(`^u_.+`)),
resource.TestMatchResourceAttr(dataSourceName, PrimaryAccountIdKey, regexache.MustCompile(`^acctpw_.+`)),
resource.TestCheckResourceAttr(dataSourceName, "authorized_actions.#", "8"),
resource.TestCheckResourceAttr(dataSourceName, "scope.0.name", "global"),
resource.TestCheckResourceAttr(dataSourceName, "scope.0.id", "global"),
resource.TestCheckResourceAttr(dataSourceName, "scope.0.type", "global"),
resource.TestCheckResourceAttr(dataSourceName, "scope.0.description", "Global Scope"),
),
},
},
})
}
+10
View File
@@ -0,0 +1,10 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import "fmt"
func FilterWithItemNameMatches(name string) string {
return fmt.Sprintf("\"/item/name\" matches \"%s\"", name)
}
+8 -1
View File
@@ -98,6 +98,7 @@ func New() *schema.Provider {
"boundary_account_password": resourceAccountPassword(),
"boundary_account_oidc": resourceAccountOidc(),
"boundary_account_ldap": resourceAccountLdap(),
"boundary_alias_target": resourceAliasTarget(),
"boundary_auth_method": resourceAuthMethod(),
"boundary_auth_method_password": resourceAuthMethodPassword(),
"boundary_auth_method_oidc": resourceAuthMethodOidc(),
@@ -120,6 +121,8 @@ func New() *schema.Provider {
"boundary_host_set": resourceHostSet(),
"boundary_host_set_static": resourceHostSetStatic(),
"boundary_host_set_plugin": resourceHostSetPlugin(),
"boundary_policy_storage": resourcePolicyStorage(),
"boundary_scope_policy_attachment": resourceScopePolicyAttachment(),
"boundary_role": resourceRole(),
"boundary_scope": resourceScope(),
"boundary_storage_bucket": resourceStorageBucket(),
@@ -128,7 +131,11 @@ func New() *schema.Provider {
"boundary_worker": resourceWorker(),
},
DataSourcesMap: map[string]*schema.Resource{
"boundary_scope": dataSourceScope(),
"boundary_account": dataSourceAccount(),
"boundary_auth_method": dataSourceAuthMethod(),
"boundary_group": dataSourceGroup(),
"boundary_scope": dataSourceScope(),
"boundary_user": dataSourceUser(),
},
}
@@ -92,8 +92,8 @@ resource "boundary_user" "alice" {
resource "boundary_role" "ldap_principal" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.global.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.global.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = [boundary_user.alice.id]
}`
)
+269
View File
@@ -0,0 +1,269 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"net/http"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/aliases"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
aliasTypeTarget = "target"
aliasTargetAuthorizeSessionHostIdKey = "authorize_session_host_id"
)
func resourceAliasTarget() *schema.Resource {
return &schema.Resource{
Description: "The target alias resource allows you to configure a Boundary target alias.",
CreateContext: resourceTargetAliasCreate,
ReadContext: resourceTargetAliasRead,
UpdateContext: resourceTargetAliasUpdate,
DeleteContext: resourceTargetAliasDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Schema: map[string]*schema.Schema{
IDKey: {
Description: "The ID of the account.",
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Description: "The alias name. Defaults to the resource name.",
Type: schema.TypeString,
Optional: true,
},
DescriptionKey: {
Description: "The alias description.",
Type: schema.TypeString,
Optional: true,
},
ScopeIdKey: {
Description: "The scope ID.",
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
ValueKey: {
Description: "The value of the alias.",
Type: schema.TypeString,
Required: true,
},
DestinationIdKey: {
Description: "The destination of the alias.",
Type: schema.TypeString,
Optional: true,
},
// Target specific configurable parameters
aliasTargetAuthorizeSessionHostIdKey: {
Description: "The host id to pass to Boundary when performing an authorize session action.",
Type: schema.TypeString,
Optional: true,
},
TypeKey: {
Description: "The type of alias; hardcoded.",
Type: schema.TypeString,
Default: aliasTypeTarget,
Optional: true,
},
},
}
}
func setFromTargetAliasResponseMap(d *schema.ResourceData, raw map[string]interface{}) error {
if err := d.Set(NameKey, raw["name"]); err != nil {
return err
}
if err := d.Set(DescriptionKey, raw["description"]); err != nil {
return err
}
if err := d.Set(ScopeIdKey, raw["scope_id"]); err != nil {
return err
}
if err := d.Set(ValueKey, raw["value"]); err != nil {
return err
}
if err := d.Set(DestinationIdKey, raw["destination_id"]); err != nil {
return err
}
if err := d.Set(TypeKey, raw["type"]); err != nil {
return err
}
if attrsVal, ok := raw["attributes"]; ok {
attrs := attrsVal.(map[string]interface{})
tarAttrs, err := aliases.AttributesMapToTargetAliasAttributes(attrs)
if err != nil {
return err
}
if tarAttrs.AuthorizeSessionArguments != nil && tarAttrs.AuthorizeSessionArguments.HostId != "" {
if err := d.Set(aliasTargetAuthorizeSessionHostIdKey, tarAttrs.AuthorizeSessionArguments.HostId); err != nil {
return err
}
}
}
d.SetId(raw["id"].(string))
return nil
}
func resourceTargetAliasCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
var scopeId string
if scopeIdVal, ok := d.GetOk(ScopeIdKey); ok {
scopeId = scopeIdVal.(string)
} else {
return diag.Errorf("no scope ID provided")
}
var typeStr string
if typeVal, ok := d.GetOk(TypeKey); ok {
typeStr = typeVal.(string)
} else {
return diag.Errorf("no type provided")
}
opts := []aliases.Option{}
if typeVal, ok := d.GetOk(ValueKey); ok {
opts = append(opts, aliases.WithValue(typeVal.(string)))
} else {
return diag.Errorf("no alias value provided")
}
if nameVal, ok := d.GetOk(NameKey); ok {
opts = append(opts, aliases.WithName(nameVal.(string)))
}
if descVal, ok := d.GetOk(DescriptionKey); ok {
opts = append(opts, aliases.WithDescription(descVal.(string)))
}
if destVal, ok := d.GetOk(DestinationIdKey); ok {
opts = append(opts, aliases.WithDestinationId(destVal.(string)))
}
if hostIdVal, ok := d.GetOk(aliasTargetAuthorizeSessionHostIdKey); ok {
opts = append(opts, aliases.WithTargetAliasAuthorizeSessionArgumentsHostId(hostIdVal.(string)))
}
aliasClient := aliases.NewClient(md.client)
alcr, err := aliasClient.Create(ctx, typeStr, scopeId, opts...)
if err != nil {
return diag.Errorf("error creating alias: %v", err)
}
if alcr == nil {
return diag.Errorf("nil alias after create")
}
if err := setFromTargetAliasResponseMap(d, alcr.GetResponse().Map); err != nil {
return diag.FromErr(err)
}
return nil
}
func resourceTargetAliasRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
alClient := aliases.NewClient(md.client)
alrr, err := alClient.Read(ctx, d.Id())
if err != nil {
if apiErr := api.AsServerError(err); apiErr.Response().StatusCode() == http.StatusNotFound {
d.SetId("")
return nil
}
return diag.Errorf("error reading auth method: %v", err)
}
if alrr == nil {
return diag.Errorf("auth method nil after read")
}
if err := setFromTargetAliasResponseMap(d, alrr.GetResponse().Map); err != nil {
return diag.FromErr(err)
}
return nil
}
func resourceTargetAliasUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
alClient := aliases.NewClient(md.client)
opts := []aliases.Option{}
if d.HasChange(NameKey) {
opts = append(opts, aliases.DefaultName())
if nameVal, ok := d.GetOk(NameKey); ok {
opts = append(opts, aliases.WithName(nameVal.(string)))
}
}
if d.HasChange(DescriptionKey) {
opts = append(opts, aliases.DefaultDescription())
if descVal, ok := d.GetOk(DescriptionKey); ok {
opts = append(opts, aliases.WithDescription(descVal.(string)))
}
}
if d.HasChange(ValueKey) {
if valVal, ok := d.GetOk(ValueKey); ok {
opts = append(opts, aliases.WithValue(valVal.(string)))
} else {
return diag.Errorf("no value provided")
}
}
if d.HasChange(DestinationIdKey) {
opts = append(opts, aliases.DefaultDestinationId())
if destId, ok := d.GetOk(DestinationIdKey); ok {
opts = append(opts, aliases.WithDestinationId(destId.(string)))
}
}
if d.HasChange(aliasTargetAuthorizeSessionHostIdKey) {
opts = append(opts, aliases.DefaultTargetAliasAuthorizeSessionArgumentsHostId())
if authSessHostId, ok := d.GetOk(aliasTargetAuthorizeSessionHostIdKey); ok {
opts = append(opts, aliases.WithTargetAliasAuthorizeSessionArgumentsHostId(authSessHostId.(string)))
}
}
if len(opts) > 0 {
opts = append(opts, aliases.WithAutomaticVersioning(true))
alur, err := alClient.Update(ctx, d.Id(), 0, opts...)
if err != nil {
return diag.Errorf("error updating auth method: %v", err)
}
if err := setFromTargetAliasResponseMap(d, alur.GetResponse().Map); err != nil {
return diag.FromErr(err)
}
return nil
}
return nil
}
func resourceTargetAliasDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
client := aliases.NewClient(md.client)
_, err := client.Delete(ctx, d.Id())
if err != nil {
return diag.Errorf("error deleting alias: %v", err)
}
return nil
}
@@ -0,0 +1,187 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"fmt"
"net/http"
"testing"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/aliases"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
type aliasDestroyType string
const (
targetAliasType aliasDestroyType = "boundary_alias_target"
targetAliasResc = "boundary_alias_target.example"
targetAliasName = "foo"
targetAliasDesc = "the foo"
targetAliasValue = "value.example"
targetAliasValueUpdated = "value.example.updated"
targetAliasNamespace = "target"
targetAliasUpdate = "_random"
)
var fooBarTarget = `
resource "boundary_target" "foo" {
type = "tcp"
name = "test"
description = "test target"
default_port = 22
address = "127.0.0.1"
scope_id = boundary_scope.proj1.id
depends_on = [boundary_role.proj1_admin]
}`
var aliasId string
func targetAliasResource(name string, description string, value string) string {
return fmt.Sprintf(`
resource "boundary_alias_target" "example" {
name = "%s"
description = "%s"
value = "%s"
scope_id = "global"
destination_id = boundary_target.foo.id
authorize_session_host_id = "hst_1234567890"
depends_on = [boundary_target.foo]
}`, name, description, value)
}
func TestAccAliasTarget(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
url := tc.ApiAddrs()[0]
res := targetAliasResource(targetAliasName, targetAliasDesc, targetAliasValue)
resUpdate := targetAliasResource(targetAliasName+targetAliasUpdate,
targetAliasDesc+targetAliasUpdate, targetAliasValueUpdated)
var provider *schema.Provider
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories(&provider),
CheckDestroy: testAccCheckAliasResourceDestroy(t, provider, targetAliasType),
Steps: []resource.TestStep{
{
// create
Config: testConfig(url, fooOrg, firstProjectFoo, fooBarTarget, res),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(targetAliasResc, NameKey, targetAliasName),
resource.TestCheckResourceAttr(targetAliasResc, DescriptionKey, targetAliasDesc),
resource.TestCheckResourceAttr(targetAliasResc, ValueKey, targetAliasValue),
testAccCheckAliasResourceExists(provider, targetAliasResc),
),
},
importStep(targetAliasResc),
{
// update
Config: testConfig(url, fooOrg, firstProjectFoo, fooBarTarget, resUpdate),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(targetAliasResc, NameKey, targetAliasName+targetAliasUpdate),
resource.TestCheckResourceAttr(targetAliasResc, DescriptionKey, targetAliasDesc+targetAliasUpdate),
resource.TestCheckResourceAttr(targetAliasResc, ValueKey, targetAliasValueUpdated),
testAccCheckAliasResourceExists(provider, targetAliasResc),
),
},
importStep(targetAliasResc),
{
// Run a plan only update and verify no changes
PlanOnly: true,
Config: testConfig(url, fooOrg, firstProjectFoo, fooBarTarget, resUpdate),
},
importStep(targetAliasResc),
{
// update again but apply a preConfig to externally update resource
// TODO: Boundary currently causes an error on moving back to a previously
// used token, for now verify that a plan only step had changes
PreConfig: func() { targetAliasExternalUpdate(t, provider) },
PlanOnly: true,
ExpectNonEmptyPlan: true,
Config: testConfig(url, fooOrg, firstProjectFoo, fooBarTarget, resUpdate),
},
importStep(targetAliasResc),
},
})
}
func targetAliasExternalUpdate(t *testing.T, testProvider *schema.Provider) {
if aliasId == "" {
t.Fatal("aliasId must be set before testing an external update")
}
md := testProvider.Meta().(*metaData)
ac := aliases.NewClient(md.client)
ar, err := ac.Read(context.Background(), aliasId)
if err != nil {
t.Fatal(fmt.Errorf("got an error reading %q: %w", storeId, err))
}
// update alias options
var opts []aliases.Option
opts = append(opts, aliases.WithDescription("this is an updated description, my guy"))
_, err = ac.Update(context.Background(), ar.Item.Id, ar.Item.Version, opts...)
if err != nil {
t.Fatal(fmt.Errorf("got an error updating %q: %w", ar.Item.Id, err))
}
}
func testAccCheckAliasResourceExists(testProvider *schema.Provider, name string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[name]
if !ok {
return fmt.Errorf("not found: %s", name)
}
id := rs.Primary.ID
if id == "" {
return fmt.Errorf("no ID is set")
}
aliasId = id
md := testProvider.Meta().(*metaData)
c := aliases.NewClient(md.client)
if _, err := c.Read(context.Background(), id); err != nil {
return fmt.Errorf("got an error reading %q: %w", id, err)
}
return nil
}
}
func testAccCheckAliasResourceDestroy(t *testing.T, testProvider *schema.Provider, typ aliasDestroyType) resource.TestCheckFunc {
return func(s *terraform.State) error {
if testProvider.Meta() == nil {
t.Fatal("got nil provider metadata")
}
md := testProvider.Meta().(*metaData)
for _, rs := range s.RootModule().Resources {
switch rs.Type {
case string(typ):
id := rs.Primary.ID
c := aliases.NewClient(md.client)
_, err := c.Read(context.Background(), id)
if apiErr := api.AsServerError(err); apiErr == nil || apiErr.Response().StatusCode() != http.StatusNotFound {
return fmt.Errorf("didn't get a 404 when reading destroyed target alias %q: %v", id, err)
}
default:
continue
}
}
return nil
}
}
@@ -29,6 +29,7 @@ const (
authmethodOidcIsPrimaryAuthMethodForScope = "is_primary_for_scope"
authmethodOidcAccountClaimMapsKey = "account_claim_maps"
authmethodOidcClaimsScopesKey = "claims_scopes"
authmethodOidcPromptsKey = "prompts"
// computed-only parameters
authmethodOidcCallbackUrlKey = "callback_url"
@@ -147,6 +148,15 @@ func resourceAuthMethodOidc() *schema.Resource {
},
Optional: true,
},
authmethodOidcPromptsKey: {
Description: "The prompts passed to the identity provider to determine whether to prompt the end-user for reauthentication, account selection or consent. " +
"Please note the values passed are case-sensitive. The valid values are: `none`, `login`, `consent` and `select_account`. ",
Type: schema.TypeList,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Optional: true,
},
// OIDC specific immutable and computed parameters
authmethodOidcClientSecretHmacKey: {
@@ -239,6 +249,10 @@ func setFromOidcAuthMethodResponseMap(d *schema.ResourceData, raw map[string]int
if p, ok := attrs[authmethodOidcClaimsScopesKey]; ok {
d.Set(authmethodOidcClaimsScopesKey, p.([]interface{}))
}
if val, ok := attrs[authmethodOidcPromptsKey]; ok {
d.Set(authmethodOidcPromptsKey, val.([]interface{}))
}
}
d.SetId(raw["id"].(string))
@@ -321,6 +335,14 @@ func resourceAuthMethodOidcCreate(ctx context.Context, d *schema.ResourceData, m
opts = append(opts, authmethods.WithOidcAuthMethodClaimsScopes(cList))
}
if prompts, ok := d.GetOk(authmethodOidcPromptsKey); ok {
promptList := []string{}
for _, p := range prompts.([]interface{}) {
promptList = append(promptList, p.(string))
}
opts = append(opts, authmethods.WithOidcAuthMethodPrompts(promptList))
}
nameVal, ok := d.GetOk(NameKey)
if ok {
nameStr := nameVal.(string)
@@ -536,6 +558,15 @@ func resourceAuthMethodOidcUpdate(ctx context.Context, d *schema.ResourceData, m
opts = append(opts, authmethods.WithOidcAuthMethodClaimsScopes(claimsScopes))
}
}
if d.HasChange(authmethodOidcPromptsKey) {
if prompts, ok := d.GetOk(authmethodOidcPromptsKey); ok {
var promptsList []string
for _, prompt := range prompts.([]interface{}) {
promptsList = append(promptsList, prompt.(string))
}
opts = append(opts, authmethods.WithOidcAuthMethodPrompts(promptsList))
}
}
if len(opts) > 0 {
opts = append(opts, authmethods.WithAutomaticVersioning(true))
@@ -67,6 +67,7 @@ EOT
signing_algorithms = ["ES256"]
account_claim_maps = ["oid=sub"]
claims_scopes = ["profile"]
prompts = ["select_account"]
}`
fooAuthMethodOidcUpdate = `
@@ -90,6 +91,7 @@ EOT
signing_algorithms = ["ES256"]
account_claim_maps = ["oid=sub"]
claims_scopes = ["profile"]
prompts = ["consent", "select_account"]
// we need to disable this validation, since the updated issuer isn't discoverable
disable_discovered_config_validation = true
@@ -125,6 +127,7 @@ func TestAccAuthMethodOidc(t *testing.T) {
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcSigningAlgorithmsKey, []string{"ES256"}),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcAccountClaimMapsKey, []string{"oid=sub"}),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcClaimsScopesKey, []string{"profile"}),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcPromptsKey, []string{"select_account"}),
testAccCheckAuthMethodResourceExists(provider, "boundary_auth_method_oidc.foo"),
testAccIsPrimaryForScope(provider, "boundary_auth_method_oidc.foo", false),
),
@@ -141,6 +144,7 @@ func TestAccAuthMethodOidc(t *testing.T) {
resource.TestCheckResourceAttr("boundary_auth_method_oidc.foo", authmethodOidcMaxAgeKey, "-1"),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcIdpCaCertsKey, []string{fooAuthMethodOidcCaCerts}),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcAllowedAudiencesKey, []string{"foo_aud_update"}),
testAccCheckAuthMethodAttrAryValueSet(provider, "boundary_auth_method_oidc.foo", authmethodOidcPromptsKey, []string{"consent", "select_account"}),
testAccCheckAuthMethodResourceExists(provider, "boundary_auth_method_oidc.foo"),
testAccIsPrimaryForScope(provider, "boundary_auth_method_oidc.foo", true),
testAccCheckAuthMethodResourceExists(provider, "boundary_auth_method_oidc.foo"),
@@ -14,15 +14,16 @@ import (
)
const (
credentialLibraryVaultSshCertificateType = "vault-ssh-certificate"
credentialLibraryVaultSshCertificatePathKey = "path"
credentialLibraryVaultSshCertificateUsernameKey = "username"
credentialLibraryVaultSshCertificateKeyTypeKey = "key_type"
credentialLibraryVaultSshCertificateKeyBitsKey = "key_bits"
credentialLibraryVaultSshCertificateTtlKey = "ttl"
credentialLibraryVaultSshCertificateKeyIdKey = "key_id"
credentialLibraryVaultSshCertificateCriticalOptionsKey = "critical_options"
credentialLibraryVaultSshCertificateExtensionsKey = "extensions"
credentialLibraryVaultSshCertificateType = "vault-ssh-certificate"
credentialLibraryVaultSshCertificatePathKey = "path"
credentialLibraryVaultSshCertificateUsernameKey = "username"
credentialLibraryVaultSshCertificateKeyTypeKey = "key_type"
credentialLibraryVaultSshCertificateKeyBitsKey = "key_bits"
credentialLibraryVaultSshCertificateTtlKey = "ttl"
credentialLibraryVaultSshCertificateKeyIdKey = "key_id"
credentialLibraryVaultSshCertificateCriticalOptionsKey = "critical_options"
credentialLibraryVaultSshCertificateExtensionsKey = "extensions"
credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey = "additional_valid_principals"
)
var libraryVaultSshCertificateAttrs = []string{
@@ -34,6 +35,7 @@ var libraryVaultSshCertificateAttrs = []string{
credentialLibraryVaultSshCertificateKeyIdKey,
credentialLibraryVaultSshCertificateCriticalOptionsKey,
credentialLibraryVaultSshCertificateExtensionsKey,
credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey,
}
func resourceCredentialLibraryVaultSshCertificate() *schema.Resource {
@@ -110,6 +112,14 @@ func resourceCredentialLibraryVaultSshCertificate() *schema.Resource {
Type: schema.TypeMap,
Optional: true,
},
credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey: {
Description: "Principals to be signed as \"valid_principles\" in addition to username.",
Type: schema.TypeList,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Optional: true,
},
},
}
}
@@ -185,6 +195,13 @@ func resourceCredentialLibraryCreateVaultSshCertificate(ctx context.Context, d *
opts = append(opts, credentiallibraries.WithVaultSSHCertificateCredentialLibraryExtensions(e))
}
}
if v, ok := d.GetOk(credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey); ok {
avp := []string{}
for _, vv := range v.([]interface{}) {
avp = append(avp, vv.(string))
}
opts = append(opts, credentiallibraries.WithVaultSSHCertificateCredentialLibraryAdditionalValidPrincipals(avp))
}
var credentialStoreId string
cid, ok := d.GetOk(credentialStoreIdKey)
@@ -375,6 +392,17 @@ func resourceCredentialLibraryUpdateVaultSshCertificate(ctx context.Context, d *
}
opts = append(opts, credentiallibraries.WithVaultSSHCertificateCredentialLibraryExtensions(e))
}
if d.HasChange(credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey) {
// set defaults first in case the value was omitted and we want to remove it
opts = append(opts, credentiallibraries.DefaultVaultSSHCertificateCredentialLibraryAdditionalValidPrincipals())
if v, ok := d.GetOk(credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey); ok {
avp := []string{}
for _, vv := range v.([]interface{}) {
avp = append(avp, vv.(string))
}
opts = append(opts, credentiallibraries.WithVaultSSHCertificateCredentialLibraryAdditionalValidPrincipals(avp))
}
}
if len(opts) > 0 {
opts = append(opts, credentiallibraries.WithAutomaticVersioning(true))
@@ -69,6 +69,9 @@ resource "boundary_credential_library_vault_ssh_certificate" "ext_co_example" {
critical_options = {
force-command = "/bin/foo"
}
additional_valid_principals = [
"principal-1"
]
}`, vaultSshCertCredLibName,
vaultSshCertCredLibDesc,
vaultSshCertCredLibPath,
@@ -86,6 +89,10 @@ resource "boundary_credential_library_vault_ssh_certificate" "ext_co_example" {
permit-pty = ""
permit-X11-forwarding = ""
}
additional_valid_principals = [
"principal-2",
"principal-3"
]
}`, vaultSshCertCredLibName,
vaultSshCertCredLibDesc,
vaultSshCertCredLibPath,
@@ -161,13 +168,14 @@ func TestAccCredentialLibraryVaultSshCertificate(t *testing.T) {
},
importStep(vaultSshCertCredResc),
{
// create with extensions and critical options
// create with extensions, critical options, and additional valid principals
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, vaultSshCertCredLibResourceExtensionsCriticalOpts),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, NameKey, vaultSshCertCredLibName),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, DescriptionKey, vaultSshCertCredLibDesc),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultPathKey, vaultSshCertCredLibPath),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateUsernameKey, vaultSshCertCredUsername),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey+".#", "1"),
testAccCheckCredentialLibraryResourceExists(provider, vaultSshCertCredExtCOResc),
),
@@ -183,6 +191,7 @@ func TestAccCredentialLibraryVaultSshCertificate(t *testing.T) {
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateUsernameKey, vaultSshCertCredUsername),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateCriticalOptionsKey+".%", "0"),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateExtensionsKey+".%", "2"),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey+".#", "2"),
testAccCheckCredentialLibraryResourceExists(provider, vaultSshCertCredExtCOResc),
),
@@ -198,6 +207,7 @@ func TestAccCredentialLibraryVaultSshCertificate(t *testing.T) {
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateUsernameKey, vaultSshCertCredUsername),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateCriticalOptionsKey+".%", "2"),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateExtensionsKey+".%", "1"),
resource.TestCheckResourceAttr(vaultSshCertCredExtCOResc, credentialLibraryVaultSshCertificateAdditionalValidPrincipalsKey+".#", "0"),
testAccCheckCredentialLibraryResourceExists(provider, vaultSshCertCredExtCOResc),
),
@@ -93,7 +93,7 @@ func TestAccCredentialStoreVault(t *testing.T) {
vaultCredStoreName+vaultCredStoreUpdate,
vaultCredStoreDesc+vaultCredStoreUpdate,
vaultCredStoreNamespace+vaultCredStoreUpdate,
"www.updated.com",
"localhost",
tokenUpdate,
false)
@@ -131,7 +131,7 @@ func TestAccCredentialStoreVault(t *testing.T) {
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultAddressKey, vcUpdate.Addr),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultNamespaceKey, vaultCredStoreNamespace+vaultCredStoreUpdate),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultCaCertKey, string(vcUpdate.CaCert)),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultTlsServerNameKey, "www.updated.com"),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultTlsServerNameKey, "localhost"),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultTlsSkipVerifyKey, "false"),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultTokenKey, tokenUpdate),
resource.TestCheckResourceAttr(vaultCredStoreResc, credentialStoreVaultTokenHmacKey, tHmacUpdate),
+6 -10
View File
@@ -13,10 +13,6 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
groupMemberIdsKey = "member_ids"
)
func resourceGroup() *schema.Resource {
return &schema.Resource{
Description: "The group resource allows you to configure a Boundary group.",
@@ -51,7 +47,7 @@ func resourceGroup() *schema.Resource {
Required: true,
ForceNew: true,
},
groupMemberIdsKey: {
GroupMemberIdsKey: {
Description: "Resource IDs for group members, these are most likely boundary users.",
Type: schema.TypeSet,
Optional: true,
@@ -71,7 +67,7 @@ func setFromGroupResponseMap(d *schema.ResourceData, raw map[string]interface{})
if err := d.Set(ScopeIdKey, raw["scope_id"]); err != nil {
return err
}
if err := d.Set(groupMemberIdsKey, raw["member_ids"]); err != nil {
if err := d.Set(GroupMemberIdsKey, raw["member_ids"]); err != nil {
return err
}
d.SetId(raw["id"].(string))
@@ -118,7 +114,7 @@ func resourceGroupCreate(ctx context.Context, d *schema.ResourceData, meta inter
}
}()
if val, ok := d.GetOk(groupMemberIdsKey); ok {
if val, ok := d.GetOk(GroupMemberIdsKey); ok {
list := val.(*schema.Set).List()
memberIds := make([]string, 0, len(list))
for _, i := range list {
@@ -209,9 +205,9 @@ func resourceGroupUpdate(ctx context.Context, d *schema.ResourceData, meta inter
// The above call may not actually happen, so we use d.Id() and automatic
// versioning here
if d.HasChange(groupMemberIdsKey) {
if d.HasChange(GroupMemberIdsKey) {
var memberIds []string
if membersVal, ok := d.GetOk(groupMemberIdsKey); ok {
if membersVal, ok := d.GetOk(GroupMemberIdsKey); ok {
members := membersVal.(*schema.Set).List()
for _, member := range members {
memberIds = append(memberIds, member.(string))
@@ -222,7 +218,7 @@ func resourceGroupUpdate(ctx context.Context, d *schema.ResourceData, meta inter
if err != nil {
return diag.Errorf("error updating members in group: %v", err)
}
if err := d.Set(groupMemberIdsKey, memberIds); err != nil {
if err := d.Set(GroupMemberIdsKey, memberIds); err != nil {
return diag.FromErr(err)
}
@@ -0,0 +1,303 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"net/http"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/policies"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
policyStorageRetainForDaysKey = "retain_for_days"
policyStorageRetainForOverridableKey = "retain_for_overridable"
policyStorageDeleteAfterDaysKey = "delete_after_days"
policyStorageDeleteAfterOverridableKey = "delete_after_overridable"
policyTypeStorage = "storage"
daysField = "days"
overridableField = "overridable"
)
func resourcePolicyStorage() *schema.Resource {
return &schema.Resource{
Description: "The storage policy resource allows you to configure a Boundary storage policy. " +
"Storage policies allow an admin to configure how long session recordings must be stored and when " +
"to delete them. Storage policies must be applied to the global scope or an org scope in order to take effect.",
CreateContext: resourcePolicyStorageCreate,
ReadContext: resourcePolicyStorageRead,
UpdateContext: resourcePolicyStorageUpdate,
DeleteContext: resourcePolicyStorageDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Schema: map[string]*schema.Schema{
IDKey: {
Description: "The ID of the policy.",
Type: schema.TypeString,
Computed: true,
},
NameKey: {
Description: "The policy name. Defaults to the resource name.",
Type: schema.TypeString,
Optional: true,
},
DescriptionKey: {
Description: "The policy description.",
Type: schema.TypeString,
Optional: true,
},
ScopeIdKey: {
Description: "The scope for this policy.",
Type: schema.TypeString,
Required: true,
},
policyStorageRetainForDaysKey: {
Description: "The number of days a session recording is required to be stored. Defaults to 0: allow deletions at any time. However, " + policyStorageRetainForDaysKey + " and " + policyStorageDeleteAfterDaysKey + " cannot both be 0.",
Type: schema.TypeInt,
Optional: true,
AtLeastOneOf: []string{policyStorageDeleteAfterDaysKey},
},
policyStorageRetainForOverridableKey: {
Description: "Whether or not the associated " + policyStorageRetainForDaysKey + " value can be overridden by org scopes. Note: if the associated " + policyStorageRetainForDaysKey + " value is 0, overridable is ignored.",
Type: schema.TypeBool,
Optional: true,
},
policyStorageDeleteAfterDaysKey: {
Description: "The number of days after which a session recording will be automatically deleted. Defaults to 0: never automatically delete. However, " + policyStorageDeleteAfterDaysKey + " and " + policyStorageRetainForDaysKey + " cannot both be 0.",
Type: schema.TypeInt,
Optional: true,
AtLeastOneOf: []string{policyStorageRetainForDaysKey},
},
policyStorageDeleteAfterOverridableKey: {
Description: "Whether or not the associated " + policyStorageDeleteAfterDaysKey + " value can be overridden by org scopes. Note: if the associated " + policyStorageDeleteAfterDaysKey + " value is 0, overridable is ignored",
Type: schema.TypeBool,
Optional: true,
},
},
}
}
func setFromPolicyItem(d *schema.ResourceData, p *policies.Policy) error {
d.SetId(p.Id)
if err := d.Set(NameKey, p.Name); err != nil {
return err
}
if err := d.Set(DescriptionKey, p.Description); err != nil {
return err
}
if err := d.Set(ScopeIdKey, p.ScopeId); err != nil {
return err
}
// parse attributes to the retain/delete values so that the tf syntax is simpler
attributes, err := p.GetStoragePolicyAttributes()
if err != nil {
return err
}
// retain_for attribute
if attributes.RetainFor != nil {
if err := d.Set(policyStorageRetainForDaysKey, attributes.RetainFor.Days); err != nil {
return err
}
if err := d.Set(policyStorageRetainForOverridableKey, attributes.RetainFor.Overridable); err != nil {
return err
}
} else {
// no RetainFor, set to nil
if err := d.Set(policyStorageRetainForDaysKey, nil); err != nil {
return err
}
if err := d.Set(policyStorageRetainForOverridableKey, nil); err != nil {
return err
}
}
// delete_after attribute
if attributes.DeleteAfter != nil {
if err := d.Set(policyStorageDeleteAfterDaysKey, attributes.DeleteAfter.Days); err != nil {
return err
}
if err := d.Set(policyStorageDeleteAfterOverridableKey, attributes.DeleteAfter.Overridable); err != nil {
return err
}
} else {
// no DeleteAfter, set to nil
if err := d.Set(policyStorageDeleteAfterDaysKey, nil); err != nil {
return err
}
if err := d.Set(policyStorageDeleteAfterOverridableKey, nil); err != nil {
return err
}
}
return nil
}
func resourcePolicyStorageCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
pClient := policies.NewClient(md.client)
opts := []policies.Option{}
var scopeId string
if scopeIdVal, ok := d.GetOk(ScopeIdKey); ok {
scopeId = scopeIdVal.(string)
} else {
return diag.Errorf("no scope ID provided")
}
if nameVal, ok := d.GetOk(NameKey); ok {
opts = append(opts, policies.WithName(nameVal.(string)))
}
if descVal, ok := d.GetOk(DescriptionKey); ok {
opts = append(opts, policies.WithDescription(descVal.(string)))
}
if retainDaysVal, ok := d.GetOk(policyStorageRetainForDaysKey); ok {
opts = append(opts, policies.WithStoragePolicyRetainForDays(int32(retainDaysVal.(int))))
} else {
opts = append(opts, policies.DefaultStoragePolicyRetainForDays())
}
if retainOverrideVal, ok := d.GetOk(policyStorageRetainForOverridableKey); ok {
opts = append(opts, policies.WithStoragePolicyRetainForOverridable(retainOverrideVal.(bool)))
} else {
opts = append(opts, policies.DefaultStoragePolicyRetainForOverridable())
}
if deleteDaysVal, ok := d.GetOk(policyStorageDeleteAfterDaysKey); ok {
opts = append(opts, policies.WithStoragePolicyDeleteAfterDays(int32(deleteDaysVal.(int))))
} else {
opts = append(opts, policies.DefaultStoragePolicyDeleteAfterDays())
}
if deleteOverrideVal, ok := d.GetOk(policyStorageDeleteAfterOverridableKey); ok {
opts = append(opts, policies.WithStoragePolicyDeleteAfterOverridable(deleteOverrideVal.(bool)))
} else {
opts = append(opts, policies.DefaultStoragePolicyDeleteAfterOverridable())
}
p, err := pClient.Create(ctx, policyTypeStorage, scopeId, opts...)
if err != nil {
return diag.Errorf("error creating storage policy: %v", err)
}
if p == nil {
return diag.Errorf("nil storage policy after create")
}
if err := setFromPolicyItem(d, p.GetItem()); err != nil {
return diag.FromErr(err)
}
return nil
}
func resourcePolicyStorageRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
pClient := policies.NewClient(md.client)
p, err := pClient.Read(ctx, d.Id())
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
d.SetId("")
return nil
}
return diag.Errorf("error reading policy: %v", err)
}
if p == nil {
return diag.Errorf("policy nil after read")
}
if err := setFromPolicyItem(d, p.GetItem()); err != nil {
return diag.FromErr(err)
}
return nil
}
func resourcePolicyStorageUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
pClient := policies.NewClient(md.client)
opts := []policies.Option{}
if d.HasChange(NameKey) {
if nameVal, ok := d.GetOk(NameKey); ok {
name := nameVal.(string)
opts = append(opts, policies.WithName(name))
} else {
opts = append(opts, policies.DefaultName())
}
}
if d.HasChange(DescriptionKey) {
if descriptionVal, ok := d.GetOk(DescriptionKey); ok {
description := descriptionVal.(string)
opts = append(opts, policies.WithDescription(description))
} else {
opts = append(opts, policies.DefaultDescription())
}
}
if d.HasChanges(policyStorageRetainForDaysKey, policyStorageRetainForOverridableKey) {
if retainDaysVal, ok := d.GetOk(policyStorageRetainForDaysKey); ok {
opts = append(opts, policies.WithStoragePolicyRetainForDays(int32(retainDaysVal.(int))))
} else {
opts = append(opts, policies.DefaultStoragePolicyRetainForDays())
}
if retainOverrideVal, ok := d.GetOk(policyStorageRetainForOverridableKey); ok {
opts = append(opts, policies.WithStoragePolicyRetainForOverridable(retainOverrideVal.(bool)))
} else {
opts = append(opts, policies.DefaultStoragePolicyRetainForOverridable())
}
}
if d.HasChanges(policyStorageDeleteAfterDaysKey, policyStorageDeleteAfterOverridableKey) {
if deleteDaysVal, ok := d.GetOk(policyStorageDeleteAfterDaysKey); ok {
opts = append(opts, policies.WithStoragePolicyDeleteAfterDays(int32(deleteDaysVal.(int))))
} else {
opts = append(opts, policies.DefaultStoragePolicyDeleteAfterDays())
}
if deleteOverrideVal, ok := d.GetOk(policyStorageDeleteAfterOverridableKey); ok {
opts = append(opts, policies.WithStoragePolicyDeleteAfterOverridable(deleteOverrideVal.(bool)))
} else {
opts = append(opts, policies.DefaultStoragePolicyDeleteAfterOverridable())
}
}
if len(opts) > 0 {
opts = append(opts, policies.WithAutomaticVersioning(true))
p, err := pClient.Update(ctx, d.Id(), 0, opts...)
if err != nil {
return diag.Errorf("error creating storage policy: %v", err)
}
if p == nil {
return diag.Errorf("nil storage policy after create")
}
if err := setFromPolicyItem(d, p.GetItem()); err != nil {
return diag.FromErr(err)
}
}
return nil
}
func resourcePolicyStorageDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
pClient := policies.NewClient(md.client)
_, err := pClient.Delete(ctx, d.Id())
if err != nil {
return diag.Errorf("error deleting policy: %v", err)
}
return nil
}
+133 -22
View File
@@ -5,7 +5,12 @@ package provider
import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
"unicode"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/roles"
@@ -14,9 +19,10 @@ import (
)
const (
roleGrantScopeIdKey = "grant_scope_id"
rolePrincipalIdsKey = "principal_ids"
roleGrantStringsKey = "grant_strings"
roleGrantScopeIdKey = "grant_scope_id"
roleGrantScopeIdsKey = "grant_scope_ids"
rolePrincipalIdsKey = "principal_ids"
roleGrantStringsKey = "grant_strings"
)
func resourceRole() *schema.Resource {
@@ -60,15 +66,24 @@ func resourceRole() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
},
roleGrantStringsKey: {
Description: " A list of stringified grants for the role.",
Description: "A list of stringified grants for the role.",
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
roleGrantScopeIdKey: {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "For Boundary 0.15+, use `grant_scope_ids` instead. The scope for which the grants in the role should apply.",
Type: schema.TypeString,
Optional: true,
Computed: true,
Deprecated: "In Boundary 0.15+, please use `grant_scope_ids` instead. This field will be removed in a future release.",
},
roleGrantScopeIdsKey: {
Description: `A list of scopes for which the grants in this role should apply, which can include the special values "this", "children", or "descendants"`,
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
},
}
@@ -90,14 +105,18 @@ func setFromRoleResponseMap(d *schema.ResourceData, raw map[string]interface{})
if err := d.Set(roleGrantStringsKey, raw["grant_strings"]); err != nil {
return err
}
if err := d.Set(roleGrantScopeIdsKey, raw["grant_scope_ids"]); err != nil {
return err
}
if err := d.Set(roleGrantScopeIdKey, raw["grant_scope_id"]); err != nil {
return err
}
d.SetId(raw["id"].(string))
return nil
}
func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (diags diag.Diagnostics) {
md := meta.(*metaData)
var scopeId string
@@ -121,11 +140,19 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
opts = append(opts, roles.WithDescription(descStr))
}
grantScopeIdVal, ok := d.GetOk(roleGrantScopeIdKey)
if ok {
grantScopeIdVal := d.Get(roleGrantScopeIdKey)
if grantScopeIdVal != "" {
grantScopeIdStr := grantScopeIdVal.(string)
opts = append(opts, roles.WithGrantScopeId(grantScopeIdStr))
}
var grantScopeIds []string
if grantScopeIdsVal, ok := d.GetOk(roleGrantScopeIdsKey); ok {
list := grantScopeIdsVal.(*schema.Set).List()
grantScopeIds = make([]string, 0, len(list))
for _, i := range list {
grantScopeIds = append(grantScopeIds, i.(string))
}
}
var principalIds []string
if principalIdsVal, ok := d.GetOk(rolePrincipalIdsKey); ok {
@@ -141,6 +168,16 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
list := grantStringsVal.(*schema.Set).List()
grantStrings = make([]string, 0, len(list))
for _, i := range list {
for _, grant := range list {
deprecationNotice, err := checkGrantForDeprecation(grant.(string))
if err != nil {
return diag.FromErr(err)
}
if deprecationNotice != "" {
diags = append(diags, diag.Diagnostic{Severity: diag.Warning, Summary: "deprecated field found in grant", Detail: deprecationNotice})
}
grantStrings = append(grantStrings, grant.(string))
}
grantStrings = append(grantStrings, i.(string))
}
}
@@ -157,7 +194,7 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
apiResponse := tcr.GetResponse().Map
defer func() {
if err := setFromRoleResponseMap(d, apiResponse); err != nil {
errs = append(errs, diag.FromErr(err)...)
diags = append(diags, diag.FromErr(err)...)
}
}()
@@ -165,9 +202,9 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
tspr, err := rc.SetPrincipals(ctx, tcr.Item.Id, 0, principalIds, roles.WithAutomaticVersioning(true))
switch {
case err != nil:
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "error setting principals", Detail: err.Error()})
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting principals", Detail: err.Error()})
case tspr == nil:
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting principals"})
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting principals"})
default:
apiResponse = tspr.GetResponse().Map
}
@@ -177,15 +214,27 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
tsgr, err := rc.SetGrants(ctx, tcr.Item.Id, 0, grantStrings, roles.WithAutomaticVersioning(true))
switch {
case err != nil:
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grants", Detail: err.Error()})
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grants", Detail: err.Error()})
case tsgr == nil:
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting grants"})
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting grants"})
default:
apiResponse = tsgr.GetResponse().Map
}
}
return errs
if grantScopeIds != nil {
tsgr, err := rc.SetGrantScopes(ctx, tcr.Item.Id, 0, grantScopeIds, roles.WithAutomaticVersioning(true))
switch {
case err != nil:
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grant scopes", Detail: err.Error()})
case tsgr == nil:
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting grant scope ids"})
default:
apiResponse = tsgr.GetResponse().Map
}
}
return diags
}
func resourceRoleRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
@@ -241,12 +290,17 @@ func resourceRoleUpdate(ctx context.Context, d *schema.ResourceData, meta interf
var grantScopeId *string
if d.HasChange(roleGrantScopeIdKey) {
opts = append(opts, roles.DefaultGrantScopeId())
grantScopeIdVal, ok := d.GetOk(roleGrantScopeIdKey)
if ok {
grantScopeIdStr := grantScopeIdVal.(string)
grantScopeId = &grantScopeIdStr
opts = append(opts, roles.WithGrantScopeId(grantScopeIdStr))
// If it is an update to use the multi-value grant_scope_ids, and this
// has changed to "", then don't set it on the API. Instead let it fall
// through and below it'll be updated to be "".
if !d.HasChange(roleGrantScopeIdsKey) {
opts = append(opts, roles.DefaultGrantScopeId())
grantScopeIdVal, ok := d.GetOk(roleGrantScopeIdKey)
if ok {
grantScopeIdStr := grantScopeIdVal.(string)
grantScopeId = &grantScopeIdStr
opts = append(opts, roles.WithGrantScopeId(grantScopeIdStr))
}
}
}
@@ -280,6 +334,13 @@ func resourceRoleUpdate(ctx context.Context, d *schema.ResourceData, meta interf
if grantStringsVal, ok := d.GetOk(roleGrantStringsKey); ok {
grants := grantStringsVal.(*schema.Set).List()
for _, grant := range grants {
deprecationNotice, err := checkGrantForDeprecation(grant.(string))
if err != nil {
return diag.FromErr(err)
}
if deprecationNotice != "" {
diags = append(diags, diag.Diagnostic{Severity: diag.Warning, Summary: "deprecated field found in grant", Detail: deprecationNotice})
}
grantStrings = append(grantStrings, grant.(string))
}
}
@@ -311,6 +372,24 @@ func resourceRoleUpdate(ctx context.Context, d *schema.ResourceData, meta interf
}
}
if d.HasChange(roleGrantScopeIdsKey) {
var grantScopeIds []string
if grantScopeIdsVal, ok := d.GetOk(roleGrantScopeIdsKey); ok {
grantScopes := grantScopeIdsVal.(*schema.Set).List()
for _, grantScope := range grantScopes {
grantScopeIds = append(grantScopeIds, grantScope.(string))
}
}
_, err := rc.SetGrantScopes(ctx, d.Id(), 0, grantScopeIds, roles.WithAutomaticVersioning(true))
if err != nil {
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grant scopes", Detail: err.Error()})
} else {
if err := d.Set(roleGrantScopeIdsKey, grantScopeIds); err != nil {
return diag.FromErr(err)
}
}
}
return diags
}
@@ -325,3 +404,35 @@ func resourceRoleDelete(ctx context.Context, d *schema.ResourceData, meta interf
return nil
}
func checkGrantForDeprecation(grantString string) (string, error) {
if len(grantString) == 0 {
return "", errors.New("missing grant string")
}
grantString = strings.ToValidUTF8(grantString, string(unicode.ReplacementChar))
switch {
case grantString[0] == '{':
raw := make(map[string]any, 4)
if err := json.Unmarshal([]byte(grantString), &raw); err != nil {
return "", fmt.Errorf("error json unmarshalling grant string: %w", err)
}
if raw["id"] != nil {
return `Grant contains an "id" field which is deprecated and will not be accepted from Boundary 0.15+. Please use "ids" instead.`, nil
}
default:
parts := strings.Split(grantString, ";")
for _, part := range parts {
splitPart := strings.Split(part, "=")
if len(splitPart) < 2 {
return "", fmt.Errorf("invalid grant part: %s", part)
}
if splitPart[0] == "id" {
return `Grant contains an "id" field which is deprecated and will not be accepted from Boundary 0.15+. Please use "ids" instead.`, nil
}
}
}
return "", nil
}
@@ -0,0 +1,295 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"fmt"
"regexp"
"testing"
"github.com/hashicorp/boundary/api/roles"
"github.com/hashicorp/boundary/testing/controller"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
var (
orgRoleWithGrantScopes = `
resource "boundary_role" "with_grant_scopes" {
name = "with_grant_scopes"
description = "with grant scopes"
principal_ids = [boundary_user.foo.id]
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_ids = ["this", "children", boundary_scope.proj1.id]
}`
orgRoleWithGrantScopesUpdate = `
resource "boundary_role" "with_grant_scopes" {
name = "with_grant_scopes_update"
description = "with grant scopes update"
principal_ids = [boundary_user.foo.id]
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_ids = ["this"]
}`
orgRoleWithInvalidGrantScopesUpdate = `
resource "boundary_role" "with_grant_scopes" {
name = "with_grant_scopes_update"
description = "with grant scopes update"
principal_ids = [boundary_user.foo.id]
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_ids = ["this", "children", "p_foobar1234"]
}`
conversionOrgRoleWithGrantScopeId = `
resource "boundary_role" "with_grant_scope_id" {
name = "grant scope id role"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_id = boundary_scope.org1.id
}`
conversionOrgRoleWithGrantScopeIdUpdate = `
resource "boundary_role" "with_grant_scope_id" {
name = "grant scope id role"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_id = boundary_scope.proj1.id
}`
conversionOrgRoleWithGrantScopeIdsConversion = `
resource "boundary_role" "with_grant_scope_id" {
name = "grant scope id role"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_ids = ["this", boundary_scope.proj1.id]
}`
conversionOrgRoleWithGrantScopeIdsUpdate = `
resource "boundary_role" "with_grant_scope_id" {
name = "grant scope id role"
scope_id = boundary_scope.org1.id
depends_on = [boundary_role.org1_admin]
grant_scope_ids = ["this", "children"]
}`
)
// TestAccRoleWithGrantScopes exercises creation and update with valid and
// invalid grant scopes
func TestAccRoleWithGrantScopes(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
IsUnitTest: true,
ProviderFactories: providerFactories(&provider),
CheckDestroy: testAccCheckRoleResourceDestroy(t, provider),
Steps: []resource.TestStep{
{
// Create with valid grant scopes should create role
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, orgRoleWithGrantScopes),
Check: resource.ComposeTestCheckFunc(
testAccCheckScopeResourceExists(provider, "boundary_scope.proj1"),
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scopes"),
testAccCheckUserResourceExists(provider, "boundary_user.foo"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scopes", []string{"this", "children", "boundary_scope.proj1"}),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", DescriptionKey, "with grant scopes"),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", NameKey, "with_grant_scopes"),
),
},
importStep("boundary_role.with_grant_scopes"),
{
// Update with invalid grant scopes should update role but return empty plan
// since grant scopes were not set correctly.
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, orgRoleWithInvalidGrantScopesUpdate),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scopes"),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", DescriptionKey, "with grant scopes update"),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", NameKey, "with_grant_scopes_update"),
),
ExpectError: regexp.MustCompile(`Unable to set grant scopes on role`),
},
{
// Update again without invalid principal should produce empty plan
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, orgRoleWithGrantScopesUpdate),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scopes"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scopes", []string{"this"}),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", DescriptionKey, "with grant scopes update"),
resource.TestCheckResourceAttr("boundary_role.with_grant_scopes", NameKey, "with_grant_scopes_update"),
),
},
importStep("boundary_role.with_grant_scopes"),
},
})
}
// TestAccRoleGrantScopeUpgrade exercises some specific upgrade scenarios around
// grant_scope_id -> grant_scope_ids
func TestAccRoleWithGrantScopesUpdate(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
resource.Test(t, resource.TestCase{
IsUnitTest: true,
ProviderFactories: providerFactories(&provider),
CheckDestroy: testAccCheckRoleResourceDestroy(t, provider),
Steps: []resource.TestStep{
{
// Create
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, conversionOrgRoleWithGrantScopeId),
Check: resource.ComposeTestCheckFunc(
testAccCheckScopeResourceExists(provider, "boundary_scope.org1"),
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scope_id"),
testAccCheckUserResourceExists(provider, "boundary_user.foo"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scope_id", []string{"boundary_scope.org1"}),
testAccCheckRoleResourceGrantScopeSet(provider, "boundary_role.with_grant_scope_id", "boundary_scope.org1"),
),
},
importStep("boundary_role.with_grant_scope_id"),
{
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, conversionOrgRoleWithGrantScopeIdUpdate),
Check: resource.ComposeTestCheckFunc(
testAccCheckScopeResourceExists(provider, "boundary_scope.org1"),
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scope_id"),
testAccCheckUserResourceExists(provider, "boundary_user.foo"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scope_id", []string{"boundary_scope.proj1"}),
testAccCheckRoleResourceGrantScopeSet(provider, "boundary_role.with_grant_scope_id", "boundary_scope.proj1"),
),
},
importStep("boundary_role.with_grant_scope_id"),
{
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, conversionOrgRoleWithGrantScopeIdsConversion),
Check: resource.ComposeTestCheckFunc(
testAccCheckScopeResourceExists(provider, "boundary_scope.org1"),
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scope_id"),
testAccCheckUserResourceExists(provider, "boundary_user.foo"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scope_id", []string{"this", "boundary_scope.proj1"}),
testAccCheckRoleResourceGrantScopeSet(provider, "boundary_role.with_grant_scope_id", ""),
),
},
importStep("boundary_role.with_grant_scope_id"),
{
Config: testConfig(url, fooOrg, firstProjectFoo, fooUser, conversionOrgRoleWithGrantScopeIdsUpdate),
Check: resource.ComposeTestCheckFunc(
testAccCheckScopeResourceExists(provider, "boundary_scope.org1"),
testAccCheckRoleResourceExists(provider, "boundary_role.with_grant_scope_id"),
testAccCheckUserResourceExists(provider, "boundary_user.foo"),
testAccCheckRoleResourceGrantScopesSet(provider, "boundary_role.with_grant_scope_id", []string{"this", "children"}),
testAccCheckRoleResourceGrantScopeSet(provider, "boundary_role.with_grant_scope_id", ""),
),
},
importStep("boundary_role.with_grant_scope_id"),
},
})
}
func testAccCheckRoleResourceGrantScopeSet(testProvider *schema.Provider, name string, grantScope string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[name]
if !ok {
return fmt.Errorf("role resource not found: %s", name)
}
roleId := rs.Primary.ID
scopeId := grantScope
if grantScope != "children" && grantScope != "this" && grantScope != "descendants" && grantScope != "" {
scope, ok := s.RootModule().Resources[grantScope]
if !ok {
return fmt.Errorf("scope resource not found: %s", grantScope)
}
scopeId = scope.Primary.ID
if scopeId == "" {
return fmt.Errorf("role resource ID is not set")
}
}
md := testProvider.Meta().(*metaData)
rolesClient := roles.NewClient(md.client)
rr, err := rolesClient.Read(context.Background(), roleId)
if err != nil {
return fmt.Errorf("Got an error when reading role %q: %v", roleId, err)
}
if rr.Item.GrantScopeId != scopeId {
return fmt.Errorf("grant scope id in state is %s but in boundary is %s", scopeId, rr.Item.GrantScopeId)
}
return nil
}
}
func testAccCheckRoleResourceGrantScopesSet(testProvider *schema.Provider, name string, grantScopeIds []string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[name]
if !ok {
return fmt.Errorf("role resource not found: %s", name)
}
id := rs.Primary.ID
if id == "" {
return fmt.Errorf("role resource ID is not set")
}
scopeIds := []string{}
for _, grantScope := range grantScopeIds {
if grantScope == "children" || grantScope == "this" || grantScope == "descendants" {
scopeIds = append(scopeIds, grantScope)
continue
}
scope, ok := s.RootModule().Resources[grantScope]
if !ok {
return fmt.Errorf("scope resource not found: %s", grantScope)
}
scopeId := scope.Primary.ID
if scopeId == "" {
return fmt.Errorf("scope resource ID not set")
}
scopeIds = append(scopeIds, scopeId)
}
md := testProvider.Meta().(*metaData)
rolesClient := roles.NewClient(md.client)
rr, err := rolesClient.Read(context.Background(), id)
if err != nil {
return fmt.Errorf("Got an error when reading role %q: %v", id, err)
}
// for every grant scope set on the role in the state, ensure each role
// in boundary has the same setings
if len(rr.Item.GrantScopeIds) == 0 {
return fmt.Errorf("no grant scope ids found in boundary")
}
for _, stateGrantScopeId := range rr.Item.GrantScopeIds {
ok := false
for _, gotScopeId := range scopeIds {
if gotScopeId == stateGrantScopeId {
ok = true
}
}
if !ok {
return fmt.Errorf("grant scope id in state not set in boundary: %s", stateGrantScopeId)
}
}
return nil
}
}
+7 -7
View File
@@ -146,9 +146,9 @@ resource "boundary_role" "with_groups" {
depends_on = [boundary_role.proj1_admin]
}`
readonlyGrant = "id=*;type=*;actions=read"
readonlyGrantUpdate = "id=*;type=*;actions=read,create"
invalidGrant = "id=*;type=*;actions=badaction"
readonlyGrant = "ids=*;type=*;actions=read"
readonlyGrantUpdate = "ids=*;type=*;actions=read,create"
invalidGrant = "ids=*;type=*;actions=badaction"
projRoleWithGrants = fmt.Sprintf(`
resource "boundary_role" "with_grants" {
@@ -189,7 +189,7 @@ resource "boundary_role" "with_grants" {
func TestAccRoleToOrgToProject(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
@@ -243,7 +243,7 @@ func TestAccRoleToOrgToProject(t *testing.T) {
func TestAccRoleWithGrants(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
@@ -302,7 +302,7 @@ func TestAccRoleWithGrants(t *testing.T) {
func TestAccRoleWithPrincipals(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
@@ -365,7 +365,7 @@ func TestAccRoleWithPrincipals(t *testing.T) {
func TestAccRoleWithGroups(t *testing.T) {
tc := controller.NewTestController(t, tcConfig...)
defer tc.Shutdown()
t.Cleanup(tc.Shutdown)
url := tc.ApiAddrs()[0]
var provider *schema.Provider
@@ -0,0 +1,164 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"context"
"fmt"
"net/http"
"strings"
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/scopes"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
const (
policyIdKey = "policy_id"
storagePolicyPrefix = "pst_"
)
func resourceScopePolicyAttachment() *schema.Resource {
return &schema.Resource{
CreateContext: resourceScopePolicyAttachmentCreate,
ReadWithoutTimeout: resourceScopePolicyAttachmentRead,
DeleteWithoutTimeout: resourceScopePolicyAttachmentDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Schema: map[string]*schema.Schema{
ScopeIdKey: {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
policyIdKey: {
Type: schema.TypeString,
ForceNew: true,
Required: true,
},
},
}
}
func resourceScopePolicyAttachmentCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
scp := scopes.NewClient(md.client)
opts := []scopes.Option{scopes.WithAutomaticVersioning(true)}
var scopeId string
if scopeIdVal, ok := d.GetOk(ScopeIdKey); ok {
scopeId = scopeIdVal.(string)
} else {
return diag.Errorf("no scope ID provided")
}
if err := d.Set(ScopeIdKey, scopeId); err != nil {
return diag.FromErr(err)
}
var policyId string
if policyIdVal, ok := d.GetOk(policyIdKey); ok {
policyId = policyIdVal.(string)
} else {
return diag.Errorf("no policy ID provided")
}
// other policy types may be added here and in other switches with this file
switch {
case strings.HasPrefix(policyId, storagePolicyPrefix):
if _, err := scp.AttachStoragePolicy(ctx, scopeId, 0, policyId, opts...); err != nil {
return diag.FromErr(err)
}
default:
return diag.Errorf("unknown policy type provided.")
}
if err := d.Set(policyIdKey, policyId); err != nil {
return diag.FromErr(err)
}
d.SetId(fmt.Sprintf("%s:%s", policyId, scopeId))
return nil
}
func resourceScopePolicyAttachmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
scp := scopes.NewClient(md.client)
var scopeId string
if scopeIdVal, ok := d.GetOk(ScopeIdKey); ok {
scopeId = scopeIdVal.(string)
} else {
return diag.Errorf("no scope ID provided")
}
var policyId string
if policyIdVal, ok := d.GetOk(policyIdKey); ok {
policyId = policyIdVal.(string)
} else {
return diag.Errorf("no policy ID provided")
}
s, err := scp.Read(ctx, scopeId)
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
// the scope is gone, destroy this resource
d.SetId("")
return nil
}
return diag.Errorf("error reading scope: %v", err)
}
if s == nil {
return diag.Errorf("scope nil after read")
}
switch {
case strings.HasPrefix(policyId, storagePolicyPrefix):
if policyId != s.GetItem().StoragePolicyId {
// this policy is no longer attached to the scope, destroy this resource
d.SetId("")
return nil
}
default:
return diag.Errorf("unknown policy type provided.")
}
return nil
}
func resourceScopePolicyAttachmentDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
md := meta.(*metaData)
scp := scopes.NewClient(md.client)
opts := []scopes.Option{scopes.WithAutomaticVersioning(true)}
var scopeId string
if scopeIdVal, ok := d.GetOk(ScopeIdKey); ok {
scopeId = scopeIdVal.(string)
} else {
return diag.Errorf("no scope ID provided")
}
var policyId string
if policyIdVal, ok := d.GetOk(policyIdKey); ok {
policyId = policyIdVal.(string)
} else {
return diag.Errorf("no policy ID provided")
}
switch {
case strings.HasPrefix(policyId, storagePolicyPrefix):
if _, err := scp.DetachStoragePolicy(ctx, scopeId, 0, opts...); err != nil {
return diag.FromErr(err)
}
default:
return diag.Errorf("unknown policy type provided.")
}
return nil
}
+8 -8
View File
@@ -33,8 +33,8 @@ resource "boundary_scope" "org1" {
resource "boundary_role" "org1_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org1.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.org1.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
`
@@ -49,8 +49,8 @@ resource "boundary_scope" "proj1" {
resource "boundary_role" "proj1_admin" {
scope_id = boundary_scope.org1.id
grant_scope_id = boundary_scope.proj1.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.proj1.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
`
@@ -65,8 +65,8 @@ resource "boundary_scope" "proj1" {
resource "boundary_role" "proj1_admin" {
scope_id = boundary_scope.org1.id
grant_scope_id = boundary_scope.proj1.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.proj1.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
`
@@ -80,8 +80,8 @@ resource "boundary_scope" "proj2" {
resource "boundary_role" "proj2_admin" {
scope_id = boundary_scope.org1.id
grant_scope_id = boundary_scope.proj2.id
grant_strings = ["id=*;type=*;actions=*"]
grant_scope_ids = [boundary_scope.proj2.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
`
+1 -1
View File
@@ -82,7 +82,7 @@ func resourceStorageBucket() *schema.Resource {
`or a file:// or env:// path. Set to a string "null" to clear any existing values. NOTE: Unlike "attributes_json", removing ` +
`this block will NOT clear secrets from the storage bucket; this allows injecting secrets for one call, then removing them for storage.`,
Type: schema.TypeString,
Required: true,
Optional: true,
Sensitive: true,
},
SecretsHmacKey: {
+32
View File
@@ -0,0 +1,32 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import "github.com/hashicorp/boundary/api/scopes"
func flattenScopeInfo(scope *scopes.ScopeInfo) []interface{} {
if scope == nil {
return []interface{}{}
}
m := make(map[string]interface{})
if v := scope.Id; v != "" {
m[IDKey] = v
}
if v := scope.Type; v != "" {
m[TypeKey] = v
}
if v := scope.Description; v != "" {
m[DescriptionKey] = v
}
if v := scope.ParentScopeId; v != "" {
m[ParentScopeIdKey] = v
}
if v := scope.Name; v != "" {
m[NameKey] = v
}
return []interface{}{m}
}
+1 -1
View File
@@ -69,6 +69,7 @@ func resourceWorker() *schema.Resource {
Description: "The worker authentication token required to register the worker for the worker-led authentication flow. Leaving this blank will result in a controller generated token.",
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
controllerGeneratedActivationToken: {
Description: "A single use token generated by the controller to be passed to the self-managed worker.",
@@ -98,7 +99,6 @@ func setFromWorkerResponseMap(d *schema.ResourceData, raw map[string]interface{}
d.Set(NameKey, raw["name"])
d.Set(DescriptionKey, raw["description"])
d.Set(address, raw["address"])
d.Set(workerGeneratedAuthToken, raw["worker_generated_auth_token"])
d.Set(controllerGeneratedActivationToken, raw["controller_generated_activation_token"])
d.Set(releaseVersion, raw["release_version"])
d.Set(authorizedActions, raw["authorized_actions"])
+9 -2
View File
@@ -80,8 +80,14 @@ func TestWorkerWorkerLed(t *testing.T) {
testAccCheckworkerResourceExists(provider, "boundary_worker.worker_led"),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "description", workerDesc),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "name", workerName),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "worker_generated_auth_token", workerToken),
),
},
{
// create
Config: testConfig(url, workerLedCreate),
PlanOnly: true,
},
importStep("boundary_worker.worker_led"),
{
// update
@@ -90,6 +96,7 @@ func TestWorkerWorkerLed(t *testing.T) {
testAccCheckworkerResourceExists(provider, "boundary_worker.worker_led"),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "description", workerDescUpdate),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "name", workerNameUpdate),
resource.TestCheckResourceAttr("boundary_worker.worker_led", "worker_generated_auth_token", workerToken),
),
},
importStep("boundary_worker.worker_led"),
@@ -118,7 +125,7 @@ func TestWorkerControllerLed(t *testing.T) {
resource.TestCheckResourceAttrSet("boundary_worker.controller_led", "controller_generated_activation_token"),
),
},
importStep("boundary_worker.controller_led"),
importStep("boundary_worker.controller_led", authorizedActions),
{
// update
Config: testConfig(url, controllerLedUpdate),
@@ -128,7 +135,7 @@ func TestWorkerControllerLed(t *testing.T) {
resource.TestCheckResourceAttr("boundary_worker.controller_led", "name", workerNameUpdate),
),
},
importStep("boundary_worker.controller_led"),
importStep("boundary_worker.controller_led", authorizedActions),
},
})
}
+7 -7
View File
@@ -11,7 +11,7 @@ require (
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1499 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
@@ -29,12 +29,12 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -11,7 +11,7 @@ require (
github.com/aws/aws-sdk-go v1.43.8 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
@@ -30,11 +30,11 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
+14 -14
View File
@@ -21,8 +21,8 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
@@ -104,8 +104,8 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -119,13 +119,13 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -137,18 +137,18 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+8 -8
View File
@@ -23,7 +23,7 @@ require (
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
@@ -37,12 +37,12 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
+16 -16
View File
@@ -53,8 +53,8 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
@@ -108,8 +108,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@@ -121,8 +121,8 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -136,14 +136,14 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -155,18 +155,18 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+14 -14
View File
@@ -8,17 +8,17 @@ require (
)
require (
cloud.google.com/go/compute v1.15.1 // indirect
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.8.0 // indirect
cloud.google.com/go/kms v1.6.0 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/kms v1.10.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
@@ -33,14 +33,14 @@ require (
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/stretchr/testify v1.8.1 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/api v0.103.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/api v0.114.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+30 -30
View File
@@ -1,14 +1,14 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww=
cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE=
cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA=
cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys=
cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk=
cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE=
cloud.google.com/go/kms v1.6.0 h1:OWRZzrPmOZUzurjI2FBGtgY2mB1WaJkqhw6oIwSj0Yg=
cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0=
cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=
cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k=
cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0=
cloud.google.com/go/kms v1.10.1 h1:7hm1bRqGCA1GBRQUrp831TwJ9TWhP+tvLuP497CQS2g=
cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI=
cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
@@ -39,8 +39,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -51,10 +51,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs=
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ=
github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8=
github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k=
github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A=
github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.1.0 h1:QsGcniKx5/LuX2eYoeL+Np3UKYPNaN7YKpTh29h8rbw=
github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
@@ -121,11 +121,11 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M=
golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec=
golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -137,21 +137,21 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ=
google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0=
google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE=
google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
@@ -160,8 +160,8 @@ google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
@@ -169,8 +169,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -182,8 +182,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+7 -7
View File
@@ -10,7 +10,7 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
@@ -26,11 +26,11 @@ require (
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/sony/gobreaker v0.4.2-0.20210216022020-dd874f9dd33b // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
+14 -14
View File
@@ -17,8 +17,8 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
@@ -84,8 +84,8 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -96,11 +96,11 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -111,18 +111,18 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+8 -8
View File
@@ -13,7 +13,7 @@ require (
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -49,14 +49,14 @@ require (
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/stretchr/testify v1.7.2 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+16 -16
View File
@@ -45,8 +45,8 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -198,8 +198,8 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@@ -211,8 +211,8 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -233,11 +233,11 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI=
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -250,18 +250,18 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+17
View File
@@ -0,0 +1,17 @@
---
page_title: "boundary_scope Data Source - terraform-provider-boundary"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---
# boundary_scope (Data Source)
{{ .Description | trimspace }}
Please note that the Global scope will always have an id of "global", and does not need to be discovered with this data source.
## Example Usage
{{tffile "examples/data-sources/boundary_scope/data-source.tf"}}
{{ .SchemaMarkdown | trimspace }}
+2
View File
@@ -7,8 +7,10 @@
package tools
//go:generate go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
//go:generate go install mvdan.cc/gofumpt
import (
// docs generator
_ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs"
_ "mvdan.cc/gofumpt"
)