Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2118a9ca5 | ||
|
|
f763123afa | ||
|
|
ccd0af3029 | ||
|
|
006ef27c8b | ||
|
|
3609d62291 | ||
|
|
5f0f43f9ec | ||
|
|
089d155851 | ||
|
|
f73f18118f | ||
|
|
c9aee30331 | ||
|
|
3147decd35 | ||
|
|
1ca8587e98 | ||
|
|
88d5ef93ed | ||
|
|
46da2bece4 | ||
|
|
14046a38cb | ||
|
|
2d920805d4 | ||
|
|
7c5ba90375 | ||
|
|
f059618167 | ||
|
|
b3df57c2eb | ||
|
|
103c89d70f | ||
|
|
1135e67dec | ||
|
|
d416385154 | ||
|
|
46bfacef27 | ||
|
|
38f44b86ea | ||
|
|
5c765bd4ae | ||
|
|
d389241166 | ||
|
|
0c86c5c5d4 | ||
|
|
4cc769fcdd | ||
|
|
6d4954dcdd | ||
|
|
db6d51daf2 | ||
|
|
2248220850 | ||
|
|
19e4890931 | ||
|
|
8c0ca4b176 | ||
|
|
e6dfaf0285 | ||
|
|
f815260205 | ||
|
|
3905031c01 | ||
|
|
8d28abdacd | ||
|
|
153c1f407f | ||
|
|
ffc88e48e4 | ||
|
|
fb78403f89 | ||
|
|
d738671047 | ||
|
|
8ebe3fba5e | ||
|
|
513fcec72e | ||
|
|
796a7b53b8 | ||
|
|
d1069ef892 | ||
|
|
d912257828 | ||
|
|
d7d7319c85 | ||
|
|
2efc03a8ae | ||
|
|
8c933816a5 | ||
|
|
3e539fec8a | ||
|
|
e5ba1a0127 | ||
|
|
2df4b6561b | ||
|
|
bfc592880f | ||
|
|
e9f7b89ad2 | ||
|
|
08f651b123 | ||
|
|
19ecce6754 | ||
|
|
570627f875 | ||
|
|
142a9984c6 | ||
|
|
c9e2843dbd | ||
|
|
efb153e034 | ||
|
|
00f16a445f | ||
|
|
c2481702ba | ||
|
|
f9cd0e893e | ||
|
|
1e3ebf2263 | ||
|
|
957b816a01 | ||
|
|
02f7efc80a | ||
|
|
740d268e63 | ||
|
|
eb7244bb65 | ||
|
|
182352b6d4 | ||
|
|
0d53402fa5 | ||
|
|
f52a0b32c3 | ||
|
|
e21b7db0c4 | ||
|
|
e47a4569cf | ||
|
|
6cfb1e3c12 | ||
|
|
4d69cde767 | ||
|
|
5004d88de5 | ||
|
|
9cd88a7864 | ||
|
|
84385332f4 | ||
|
|
63fad8e763 | ||
|
|
c2c25838bd | ||
|
|
53ee95cb05 | ||
|
|
4db46625d3 | ||
|
|
3521817758 | ||
|
|
d180d5ba0d | ||
|
|
8001b12fa2 | ||
|
|
af60d2e30b | ||
|
|
1b6ecc392f | ||
|
|
b3b98a085b | ||
|
|
85f9a3d081 | ||
|
|
39563fb317 | ||
|
|
bdf9efdcaa | ||
|
|
f95483bd7f | ||
|
|
a8d679d118 | ||
|
|
8ec00c0b42 | ||
|
|
278925e5b5 | ||
|
|
06ee60eecf | ||
|
|
f0ba588a35 | ||
|
|
d26c389669 | ||
|
|
ab26f51db1 | ||
|
|
514fa81a99 | ||
|
|
395dda1006 | ||
|
|
67d786dbef | ||
|
|
05c94cf96a | ||
|
|
f87fa8036e | ||
|
|
388f4d8b33 | ||
|
|
e625176e36 | ||
|
|
2dc5699ae2 | ||
|
|
ad8dcfcc24 | ||
|
|
02a9fbd98c | ||
|
|
0dc805c4e8 | ||
|
|
c42dad6b09 | ||
|
|
7dbcc88daf | ||
|
|
80a9e65997 | ||
|
|
7055507cfe | ||
|
|
55383a53b5 | ||
|
|
a665f6409a | ||
|
|
6f51147c7c | ||
|
|
fea6f4b662 | ||
|
|
347f5760a4 | ||
|
|
b126bdcdb6 | ||
|
|
77c8f52d90 | ||
|
|
eeb5fc43d2 | ||
|
|
8a8df155a6 | ||
|
|
895b06d90c | ||
|
|
0ed435d80b | ||
|
|
6bfd56cd02 | ||
|
|
4590d94f77 | ||
|
|
4f6a9d95e8 | ||
|
|
4db8e98628 | ||
|
|
88171adae2 | ||
|
|
0fcadd690a | ||
|
|
ce487f406f | ||
|
|
c4989de229 | ||
|
|
a17e75224f | ||
|
|
6aeb82110e | ||
|
|
67ef83e347 | ||
|
|
86a99ae47a | ||
|
|
afb376b135 | ||
|
|
faee60fcf8 | ||
|
|
f818017976 | ||
|
|
22fac2f569 | ||
|
|
2c5a595592 | ||
|
|
7124548774 | ||
|
|
8d82258cf5 | ||
|
|
584aabacbb | ||
|
|
01c68bcae8 | ||
|
|
07e332f79b | ||
|
|
f2300e6f96 | ||
|
|
0423202f9d | ||
|
|
1e1b10da59 | ||
|
|
5a5654bce0 | ||
|
|
4ac6cf3ee1 | ||
|
|
3e664429b3 | ||
|
|
fa432c79ba | ||
|
|
4352dff7ec | ||
|
|
3d6e8f8e46 | ||
|
|
357c83d9ca | ||
|
|
1c1c095a66 | ||
|
|
f9fd811205 | ||
|
|
ad43c0bec0 | ||
|
|
5d6d277186 | ||
|
|
4590e7f8c8 | ||
|
|
47c3f92f5c | ||
|
|
490476a5e5 | ||
|
|
a256b763ae | ||
|
|
f6539b969c | ||
|
|
695e28a38b | ||
|
|
b7b11dd817 | ||
|
|
b9bc73d4cf |
No files matched your search
@@ -0,0 +1 @@
|
||||
1.0.1+ent
|
||||
@@ -0,0 +1,48 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags-ignore: ['**']
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '17 6 * * *'
|
||||
|
||||
env:
|
||||
GOPRIVATE: repo.anhonesthost.net
|
||||
GOFLAGS: -buildvcs=false
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: false
|
||||
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Unit tests (no controller required)
|
||||
run: make test
|
||||
|
||||
- name: Build release binary (linux/amd64)
|
||||
run: |
|
||||
CGO_ENABLED=0 go build -trimpath -o "$RUNNER_TEMP/terraform-provider-threshold" .
|
||||
test -x "$RUNNER_TEMP/terraform-provider-threshold"
|
||||
|
||||
- name: govulncheck
|
||||
run: |
|
||||
go install golang.org/x/vuln/cmd/govulncheck@v1.9.0
|
||||
"$(go env GOPATH)/bin/govulncheck" ./...
|
||||
|
||||
- name: osv-scanner
|
||||
run: |
|
||||
go install github.com/google/osv-scanner/v2/cmd/osv-scanner@v2.7.0
|
||||
"$(go env GOPATH)/bin/osv-scanner" scan source -r .
|
||||
@@ -1,20 +0,0 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
# See GitHub's docs for more information on this file:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every weekday
|
||||
interval: "daily"
|
||||
|
||||
# Maintain dependencies for Go modules
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to Go modules every weekday
|
||||
interval: "daily"
|
||||
@@ -0,0 +1,11 @@
|
||||
## PCI review checklist
|
||||
|
||||
<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
|
||||
|
||||
- [ ] I have documented a clear reason for, and description of, the change I am making.
|
||||
|
||||
- [ ] If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
|
||||
|
||||
- [ ] If applicable, I've documented the impact of any changes to security controls.
|
||||
|
||||
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.
|
||||
@@ -1,15 +0,0 @@
|
||||
name: Lint GitHub Actions workflows
|
||||
on: push
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||
- name: Check workflow files
|
||||
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:02ccb6d91e4cb4a7b21eb99d5274d257e81ae667688d730e89d7ea0d6d35db91
|
||||
with:
|
||||
args: -color
|
||||
@@ -1,90 +0,0 @@
|
||||
on:
|
||||
issues:
|
||||
types: [opened, closed, deleted, reopened]
|
||||
pull_request_target:
|
||||
types: [opened, closed, reopened]
|
||||
issue_comment: # Also triggers when commenting on a PR from the conversation view
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
name: Jira Sync
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
name: Jira sync
|
||||
steps:
|
||||
- name: Check if community user
|
||||
if: github.event.action == 'opened'
|
||||
id: boundary-team-role
|
||||
run: |
|
||||
TEAM="boundary"
|
||||
ROLE="$(hub api orgs/hashicorp/teams/${TEAM}/memberships/${{ github.actor }} | jq -r '.role | select(.!=null)')"
|
||||
if [[ -n "${ROLE}" ]]; then
|
||||
echo "Actor ${{ github.actor }} is a ${TEAM} team member, skipping ticket creation"
|
||||
else
|
||||
echo "Actor ${{ github.actor }} is not a ${TEAM} team member"
|
||||
fi
|
||||
echo "name=role::${ROLE}" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
|
||||
|
||||
- name: Login
|
||||
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
|
||||
env:
|
||||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
||||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
||||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
||||
|
||||
- name: Set ticket type
|
||||
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
||||
id: set-ticket-type
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
|
||||
echo "name=type::PR" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "name=type::ISS" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create ticket
|
||||
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
||||
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1
|
||||
with:
|
||||
project: ICU
|
||||
issuetype: "GH Issue"
|
||||
summary: "${{ github.event.repository.name }} [${{ steps.set-ticket-type.outputs.type }} #${{ github.event.issue.number || github.event.pull_request.number }}]: ${{ github.event.issue.title || github.event.pull_request.title }}"
|
||||
description: "${{ github.event.issue.body || github.event.pull_request.body }}\n\n_Created from GitHub Action for ${{ github.event.issue.html_url || github.event.pull_request.html_url }} from ${{ github.actor }}_"
|
||||
# customfield_10089 is Issue Link custom field
|
||||
extraFields: '{"customfield_10089": "${{ github.event.issue.html_url || github.event.pull_request.html_url }}"}'
|
||||
|
||||
- name: Search
|
||||
if: github.event.action != 'opened'
|
||||
id: search
|
||||
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
|
||||
with:
|
||||
# cf[10089] is Issue Link custom field
|
||||
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
|
||||
|
||||
- name: Sync comment
|
||||
if: github.event.action == 'created' && steps.search.outputs.issue
|
||||
uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0
|
||||
with:
|
||||
issue: ${{ steps.search.outputs.issue }}
|
||||
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
|
||||
|
||||
- name: Close ticket
|
||||
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
|
||||
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.0.1
|
||||
with:
|
||||
issue: ${{ steps.search.outputs.issue }}
|
||||
transition: "To Do"
|
||||
@@ -1,43 +0,0 @@
|
||||
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)"
|
||||
@@ -1,55 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
go-version:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.go-version.outputs.go-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||
- id: 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"
|
||||
release-notes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
with:
|
||||
name: release-notes
|
||||
path: release-notes.txt
|
||||
retention-days: 1
|
||||
terraform-provider-release:
|
||||
name: 'Terraform Provider Release'
|
||||
needs: [go-version, release-notes]
|
||||
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 }}'
|
||||
hc-releases-host-prod: '${{ secrets.HC_RELEASES_HOST_PROD }}'
|
||||
hc-releases-key-prod: '${{ secrets.HC_RELEASES_KEY_PROD }}'
|
||||
hc-releases-key-staging: '${{ secrets.HC_RELEASES_KEY_STAGING }}'
|
||||
hc-releases-terraform-registry-sync-token: '${{ secrets.TF_PROVIDER_RELEASE_TERRAFORM_REGISTRY_SYNC_TOKEN }}'
|
||||
setup-signore-github-token: '${{ secrets.HASHI_SIGNORE_GITHUB_TOKEN }}'
|
||||
signore-client-id: '${{ secrets.SIGNORE_CLIENT_ID }}'
|
||||
signore-client-secret: '${{ secrets.SIGNORE_CLIENT_SECRET }}'
|
||||
with:
|
||||
release-notes: true
|
||||
setup-go-version: '${{ needs.go-version.outputs.version }}'
|
||||
# Product Version (e.g. v1.2.3 or github.ref_name)
|
||||
product-version: '${{ github.ref_name }}'
|
||||
@@ -1,45 +0,0 @@
|
||||
name: test
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
- workflow_dispatch
|
||||
- workflow_call
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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
|
||||
# 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 }}"
|
||||
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@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
with:
|
||||
path: |
|
||||
${{ steps.go-cache-paths.outputs.go-build }}
|
||||
${{ steps.go-cache-paths.outputs.go-mod }}
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go
|
||||
- name: Acceptance Tests
|
||||
run: |
|
||||
make testacc
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.21.5
|
||||
1.26.6
|
||||
+19
-66
@@ -1,78 +1,31 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
archives:
|
||||
- files:
|
||||
# Ensure only built binary is archived
|
||||
- 'none*'
|
||||
format: zip
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||
# Local/unsigned release config. No GPG signing, Vault, Artifactory or
|
||||
# Terraform Registry publishing: this fork has no registry.
|
||||
# Try it with: goreleaser build --snapshot --clean
|
||||
version: 2
|
||||
project_name: terraform-provider-threshold
|
||||
before:
|
||||
hooks:
|
||||
- 'go mod download'
|
||||
- './scripts/plugins-all.sh'
|
||||
- go mod tidy
|
||||
builds:
|
||||
- # Binary naming only required for Terraform CLI 0.12
|
||||
binary: '{{ .ProjectName }}_v{{ .Version }}_x5'
|
||||
- id: provider
|
||||
main: .
|
||||
binary: "{{ .ProjectName }}_v{{ .Version }}"
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
flags:
|
||||
- -trimpath
|
||||
goos:
|
||||
- darwin
|
||||
- freebsd
|
||||
- linux
|
||||
- windows
|
||||
goarch:
|
||||
- '386'
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
ignore:
|
||||
- goarch: arm
|
||||
goos: windows
|
||||
- goarch: arm64
|
||||
goos: freebsd
|
||||
- goarch: arm64
|
||||
goos: windows
|
||||
ldflags:
|
||||
- -s -w -X main.Version={{.Version}}
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
- -s -w
|
||||
goos: [linux, darwin, windows]
|
||||
goarch: [amd64, arm64]
|
||||
archives:
|
||||
- formats: [zip]
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
checksum:
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
|
||||
algorithm: sha256
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||
publishers:
|
||||
- checksum: true
|
||||
# Terraform CLI 0.10 - 0.11 perform discovery via HTTP headers on releases.hashicorp.com
|
||||
# For providers which have existed since those CLI versions, exclude
|
||||
# discovery by setting the protocol version headers to 5.
|
||||
cmd: hc-releases upload -product {{ .ProjectName }} -version {{ .Version }} -file={{ .ArtifactPath }}={{ .ArtifactName }} -header=x-terraform-protocol-version=5 -header=x-terraform-protocol-versions=5.0
|
||||
env:
|
||||
- HC_RELEASES_HOST={{ .Env.HC_RELEASES_HOST }}
|
||||
- HC_RELEASES_KEY={{ .Env.HC_RELEASES_KEY }}
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
name: upload
|
||||
signature: true
|
||||
release:
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
ids:
|
||||
- none
|
||||
signs:
|
||||
- args: ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
|
||||
artifacts: checksum
|
||||
cmd: signore
|
||||
signature: ${artifact}.sig
|
||||
- args: ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
|
||||
artifacts: checksum
|
||||
cmd: signore
|
||||
id: key-id
|
||||
signature: ${artifact}.72D7468F.sig
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
disable: true
|
||||
changelog:
|
||||
disable: true
|
||||
@@ -1,5 +0,0 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
url_source_repository = "https://github.com/hashicorp/terraform-provider-boundary"
|
||||
url_license = "https://github.com/hashicorp/terraform-provider-boundary/blob/main/LICENSE"
|
||||
+72
-1
@@ -3,6 +3,77 @@
|
||||
Canonical reference for changes, improvements, and bugfixes for the Boundary Terraform provider.
|
||||
|
||||
## Next
|
||||
## 1.6.1 (Jul 24th, 2026)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Adds support to enable set/remove alias suffix and aliases at project scope
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/824))
|
||||
|
||||
## 1.6.0 (Jul 8th, 2026)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Adds support to enable Session Recording for RDP Targets
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/818))
|
||||
|
||||
|
||||
## 1.5.1 (Feb 2nd, 2026)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Adds support for Vault LDAP Credential Store.
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/778))
|
||||
|
||||
## 1.5.0 (December 19th, 2025)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Adds support for Password credentials.
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/758))
|
||||
|
||||
## 1.4.0 (September 25th, 2025)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Adds support for new RDP target type and Username, Password, and Domain credentials.
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/735))
|
||||
|
||||
## 1.3.1 (July 11th, 2025)
|
||||
|
||||
### Bug Fix
|
||||
|
||||
* Fixes a problem where the KMS plugins were not being bundled in the provider's
|
||||
binary ([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/717))
|
||||
|
||||
## 1.3.0 (July 9th, 2025)
|
||||
|
||||
### Known Issues
|
||||
|
||||
* `Error configuring kms: plugin is nil`: This error message may occur when you
|
||||
attempt to use KMS plugin functionality. The [KMS plugins](plugins/kms/mains)
|
||||
were not bundled in this Terraform provider release and thus any functionality
|
||||
related to this will not work.
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Updates various dependencies across the provider
|
||||
([Example PR](https://github.com/hashicorp/terraform-provider-boundary/pull/708))
|
||||
|
||||
## 1.2.0 (October 21, 2024)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Introduces support for specifying a worker filter in dynamic host catalogs
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/626))
|
||||
|
||||
### Deprecations/Changes
|
||||
|
||||
* With Boundary 0.15, a deprecation notice was put under the `grant_scope_id`
|
||||
field, and a new `grant_scope_ids` field was introduced to replace it. With
|
||||
Boundary v0.17.1 and Boundary API v0.0.52, `grant_scope_id` support was
|
||||
entirely removed. `grant_scope_id` support has now been removed from this TF
|
||||
provider.
|
||||
|
||||
## 1.1.15 (May 1, 2024)
|
||||
|
||||
@@ -337,4 +408,4 @@ Update provider to handle new domain errors ([PR](https://github.com/hashicorp/t
|
||||
|
||||
## 0.1.0 (October 14, 2020)
|
||||
|
||||
Initial release!
|
||||
Initial release!
|
||||
@@ -1,4 +0,0 @@
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo, unless a later match takes precedence.
|
||||
|
||||
@hashicorp/boundary
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
FROM golang:1.20
|
||||
|
||||
WORKDIR /go/src/terraform-provider-boundary
|
||||
COPY . .
|
||||
|
||||
RUN go get -d -v ./...
|
||||
RUN go install -v ./...
|
||||
@@ -1,14 +1,14 @@
|
||||
default: testacc
|
||||
GOOS=$(shell go env GOOS)
|
||||
GOARCH=$(shell go env GOARCH)
|
||||
INSTALL_PATH=~/.local/share/terraform/plugins/localhost/providers/boundary/0.0.1/linux_$(GOARCH)
|
||||
INSTALL_PATH=~/.local/share/terraform/plugins/repo.anhonesthost.net/cybercovellc/threshold/0.0.1/linux_$(GOARCH)
|
||||
BUILD_ALL_PATH=${PWD}/bin
|
||||
|
||||
ifeq ($(GOOS), darwin)
|
||||
INSTALL_PATH=~/Library/Application\ Support/io.terraform/plugins/localhost/providers/boundary/0.0.1/darwin_$(GOARCH)
|
||||
INSTALL_PATH=~/Library/Application\ Support/io.terraform/plugins/repo.anhonesthost.net/cybercovellc/threshold/0.0.1/darwin_$(GOARCH)
|
||||
endif
|
||||
ifeq ($(GOOS), "windows")
|
||||
INSTALL_PATH=%APPDATA%/HashiCorp/Terraform/plugins/localhost/providers/boundary/0.0.1/windows_$(GOARCH)
|
||||
INSTALL_PATH=%APPDATA%/HashiCorp/Terraform/plugins/repo.anhonesthost.net/cybercovellc/threshold/0.0.1/windows_$(GOARCH)
|
||||
endif
|
||||
|
||||
REGISTRY_NAME?=docker.io/hashicorpboundary
|
||||
@@ -25,27 +25,38 @@ tools:
|
||||
go generate -tags tools tools/tools.go
|
||||
go install github.com/hashicorp/copywrite@v0.15.0
|
||||
|
||||
# Unit tests: only the tests that do not need a running Threshold/Boundary
|
||||
# controller. Everything else is an acceptance test, run via `make testacc`.
|
||||
UNIT_TESTS = ^(TestProvider|TestSetFromVaultCredentialStoreResponseMapReadsWorkerFilterFromAttributes|TestAccTargetWithAddress_HostSourceAndAddressConflict|TestValidateTargetAliasScope|TestAliasSuffixFromScopeResponseMap|TestValidateAliasSuffixScope)$$
|
||||
|
||||
test:
|
||||
echo "Placeholder"
|
||||
go test ./... -count=1 -run '$(UNIT_TESTS)'
|
||||
|
||||
VERSION ?= $(shell cat version/VERSION)
|
||||
|
||||
# Cross-compile release binaries for linux/darwin/windows x amd64/arm64 into dist/
|
||||
.PHONY: build-all
|
||||
build-all:
|
||||
./scripts/build-release.sh $(VERSION)
|
||||
|
||||
# Run acceptance tests
|
||||
testacc:
|
||||
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
|
||||
./test.sh
|
||||
|
||||
dev:
|
||||
GOOS=${GOOS} GOARCH=${GOARCH} ./scripts/plugins.sh
|
||||
mkdir -p $(INSTALL_PATH)
|
||||
go build -o $(INSTALL_PATH)/terraform-provider-boundary main.go
|
||||
go build -o $(INSTALL_PATH)/terraform-provider-threshold main.go
|
||||
|
||||
dev-no-plugins:
|
||||
mkdir -p $(INSTALL_PATH)
|
||||
go build -o $(INSTALL_PATH)/terraform-provider-boundary main.go
|
||||
go build -o $(INSTALL_PATH)/terraform-provider-threshold main.go
|
||||
|
||||
all:
|
||||
mkdir -p $(BUILD_ALL_PATH)
|
||||
GOOS=darwin go build -o $(BUILD_ALL_PATH)/terraform-provider-boundary_darwin-amd64 main.go
|
||||
GOOS=windows go build -o $(BUILD_ALL_PATH)/terraform-provider-boundary_windows-amd64 main.go
|
||||
GOOS=linux go build -o $(BUILD_ALL_PATH)/terraform-provider-boundary_linux-amd64 main.go
|
||||
GOOS=darwin go build -o $(BUILD_ALL_PATH)/terraform-provider-threshold_darwin-amd64 main.go
|
||||
GOOS=windows go build -o $(BUILD_ALL_PATH)/terraform-provider-threshold_windows-amd64 main.go
|
||||
GOOS=linux go build -o $(BUILD_ALL_PATH)/terraform-provider-threshold_linux-amd64 main.go
|
||||
|
||||
docs:
|
||||
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
terraform-provider-threshold
|
||||
|
||||
This project is a community fork of terraform-provider-boundary
|
||||
(https://github.com/hashicorp/terraform-provider-boundary),
|
||||
Copyright (c) HashiCorp, Inc. / IBM Corp., licensed under the Mozilla Public
|
||||
License, version 2.0. The original copyright and license notices are retained in
|
||||
LICENSE and in the source file headers.
|
||||
|
||||
Modifications in this fork (Go module path, imports of the Threshold api/sdk
|
||||
modules, product wording, removal of HashiCorp release tooling, CI) are made by
|
||||
CyberCove LLC and its contributors and are likewise made available under MPL-2.0.
|
||||
|
||||
This fork is a community project for Threshold, a community fork of Boundary CE.
|
||||
It is not affiliated with, endorsed by, or supported by HashiCorp or IBM.
|
||||
"Boundary", "Terraform" and "HashiCorp" are trademarks of their respective owners.
|
||||
@@ -1,33 +1,112 @@
|
||||

|
||||
# Terraform Provider for Threshold
|
||||
|
||||
# Terraform Provider Boundary
|
||||
A community fork of [hashicorp/terraform-provider-boundary](https://github.com/hashicorp/terraform-provider-boundary)
|
||||
for [Threshold](https://repo.anhonesthost.net/CyberCoveLLC/threshold), itself a community fork of Boundary CE.
|
||||
|
||||
Available in the [Terraform Registry](https://registry.terraform.io/providers/hashicorp/boundary/latest).
|
||||
## About this fork
|
||||
|
||||
- **Upstream:** `hashicorp/terraform-provider-boundary`, licensed MPL-2.0 (see [LICENSE](LICENSE) and [NOTICE](NOTICE)).
|
||||
This fork is not affiliated with, endorsed by, or supported by HashiCorp or IBM.
|
||||
- **What changed:** the Go module is `repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold`,
|
||||
it builds against the Threshold `api` and `sdk` Go modules
|
||||
(`repo.anhonesthost.net/CyberCoveLLC/threshold/api` and `.../sdk`), and product wording in docs and
|
||||
schema descriptions says "Threshold". Release plumbing for HashiCorp's CRT/registry pipeline was removed.
|
||||
- **Compatibility:** resource and data source type names (`boundary_*`), provider arguments (`addr`,
|
||||
`auth_method_id`, ...) and the `BOUNDARY_*` environment variables are unchanged, so existing Terraform
|
||||
configurations keep working. Because the resource types start with `boundary_`, Terraform infers the
|
||||
provider local name `boundary`; keep `boundary = { source = ... }` in `required_providers`.
|
||||
- **Distribution:** there is no public registry for this provider. Install it from a release zip or a local build
|
||||
as described below. Its address is `repo.anhonesthost.net/cybercovellc/threshold`.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.x
|
||||
- [Go](https://golang.org/doc/install) >= 1.21
|
||||
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.x (or OpenTofu)
|
||||
- [Go](https://golang.org/doc/install) >= 1.26 (see `go.mod`), with `GOPRIVATE=repo.anhonesthost.net` if the Threshold modules are not publicly fetchable
|
||||
|
||||
## Building The Provider
|
||||
## Installing
|
||||
|
||||
1. Clone the repository
|
||||
1. Enter the repository directory
|
||||
1. Build the provider using `make dev`. This will place the provider onto your system in a [Terraform 0.13-compliant](https://www.terraform.io/upgrade-guides/0-13.html#in-house-providers) manner.
|
||||
Provider address: `repo.anhonesthost.net/cybercovellc/threshold`. Version `0.1.0` is used in the examples.
|
||||
|
||||
You'll need to ensure that your Terraform file contains the information necessary to find the plugin when running `terraform init`. `make dev` will use a version number of 0.0.1, so the following block will work:
|
||||
### 1. Build locally
|
||||
|
||||
```sh
|
||||
export GOPRIVATE=repo.anhonesthost.net
|
||||
make build-all VERSION=0.1.0 # or: scripts/build-release.sh 0.1.0 dist
|
||||
# single platform, no zip:
|
||||
go build -o terraform-provider-threshold .
|
||||
# with goreleaser installed:
|
||||
goreleaser build --snapshot --clean --single-target
|
||||
```
|
||||
|
||||
`make build-all` writes `dist/terraform-provider-threshold_<version>_<os>_<arch>.zip` for linux, darwin and
|
||||
windows on amd64 and arm64 (needs `zip`). Never commit `dist/`.
|
||||
|
||||
### 2. Filesystem mirror (recommended for shared hosts)
|
||||
|
||||
Terraform's `provider_installation` can serve providers from a local directory. Layout (unpacked form):
|
||||
|
||||
```
|
||||
/usr/share/terraform/providers/
|
||||
repo.anhonesthost.net/cybercovellc/threshold/0.1.0/linux_amd64/terraform-provider-threshold_v0.1.0
|
||||
```
|
||||
|
||||
or the packed form: `.../repo.anhonesthost.net/cybercovellc/threshold/terraform-provider-threshold_0.1.0_linux_amd64.zip`.
|
||||
Then in `~/.terraformrc` (`%APPDATA%\terraform.rc` on Windows):
|
||||
|
||||
```hcl
|
||||
provider_installation {
|
||||
filesystem_mirror {
|
||||
path = "/usr/share/terraform/providers"
|
||||
include = ["repo.anhonesthost.net/cybercovellc/threshold"]
|
||||
}
|
||||
direct {
|
||||
exclude = ["repo.anhonesthost.net/cybercovellc/threshold"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
and in your configuration:
|
||||
|
||||
```hcl
|
||||
terraform {
|
||||
required_providers {
|
||||
boundary = {
|
||||
source = "localhost/providers/boundary"
|
||||
version = "0.0.1"
|
||||
source = "repo.anhonesthost.net/cybercovellc/threshold"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "boundary" {
|
||||
addr = "https://threshold.example.com:9200"
|
||||
# auth_method_id / auth_method_login_name / auth_method_password, token, or recovery_kms_hcl
|
||||
}
|
||||
```
|
||||
|
||||
### 3. dev_overrides (development)
|
||||
|
||||
Build the binary into a directory and point Terraform at it (`terraform init` is not needed, and `terraform plan`
|
||||
prints a warning):
|
||||
|
||||
```hcl
|
||||
# ~/.terraformrc
|
||||
provider_installation {
|
||||
dev_overrides {
|
||||
"repo.anhonesthost.net/cybercovellc/threshold" = "/home/you/go/bin" # directory holding terraform-provider-threshold
|
||||
}
|
||||
direct {}
|
||||
}
|
||||
```
|
||||
|
||||
`go install .` places `terraform-provider-threshold` in `$GOPATH/bin`. `make dev` installs a `0.0.1` build
|
||||
into Terraform's implied local mirror under the same address.
|
||||
|
||||
## Building The Provider
|
||||
|
||||
1. Clone the repository
|
||||
1. Enter the repository directory
|
||||
1. Build with `go build -o terraform-provider-threshold .` (or `make dev`, which also builds the optional built-in KMS plugins from `plugins/kms/mains`)
|
||||
|
||||
## Adding Dependencies
|
||||
|
||||
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
|
||||
@@ -48,7 +127,9 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or
|
||||
|
||||
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
|
||||
|
||||
In order to run the full suite of Acceptance tests,
|
||||
Unit tests (no controller needed) run with `make test`. All other tests are acceptance tests and require a running
|
||||
Threshold/Boundary-compatible controller (`BOUNDARY_ADDR`, `BOUNDARY_AUTH_TOKEN`, `BOUNDARY_DEV_RECOVERY_KEY`) and, for the
|
||||
Vault tests, Docker. In order to run the full suite of Acceptance tests,
|
||||
a postgres docker container must be started first:
|
||||
|
||||
```sh
|
||||
@@ -65,23 +146,23 @@ $ 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).
|
||||
[Threshold contributing guide](https://repo.anhonesthost.net/CyberCoveLLC/threshold).
|
||||
|
||||
## 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)
|
||||
If you're using vscode, this provider has delve debugging baked into the [.vscode](https://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/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))
|
||||
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://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/tree/main/examples) then you execute a binary to generate the docs which are placed in [./docs](https://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/tree/main/docs). Optionally, you can specify your own [templates](https://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/tree/main/templates) for a resource or data source if you want to add custom information (example: [data "boundary_scope"](https://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/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.
|
||||
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://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/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.
|
||||
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://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/tree/main/examples) directory or update the existing files. Next make sure the corresponding template in [./templates](https://repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold/tree/main/templates) directory references this example.
|
||||
|
||||
### Generating
|
||||
|
||||
@@ -93,14 +174,14 @@ go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
|
||||
|
||||
## 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:
|
||||
Please see our detailed docs for individual resource usage. Below is a complex example using the provider to configure all resource types available:
|
||||
|
||||
```hcl
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
password_auth_method_login_name = "myuser" # changeme
|
||||
password_auth_method_password = "passpass" # changeme
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
auth_method_login_name = "myuser" # changeme
|
||||
auth_method_password = "passpass" # changeme
|
||||
}
|
||||
|
||||
variable "users" {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
@@ -3,17 +3,17 @@
|
||||
page_title: "boundary_account Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The boundary_account data source allows you to find a Boundary account.
|
||||
The boundary_account data source allows you to find a Threshold account.
|
||||
---
|
||||
|
||||
# boundary_account (Data Source)
|
||||
|
||||
The boundary_account data source allows you to find a Boundary account.
|
||||
The boundary_account data source allows you to find a Threshold account.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
# Retrieve the ID of a Boundary account
|
||||
# Retrieve the ID of a Threshold account
|
||||
data "boundary_account" "admin" {
|
||||
name = "admin"
|
||||
auth_method_id = "ampw_1234567890"
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_auth_method Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The boundaryauthmethod data source allows you to find a Boundary auth method.
|
||||
The boundary_auth_method data source allows you to find a Threshold auth method.
|
||||
---
|
||||
|
||||
# boundary_auth_method (Data Source)
|
||||
|
||||
The boundary_auth_method data source allows you to find a Boundary auth method.
|
||||
The boundary_auth_method data source allows you to find a Threshold auth method.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_group Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The boundary_group data source allows you to find a Boundary group.
|
||||
The boundary_group data source allows you to find a Threshold group.
|
||||
---
|
||||
|
||||
# boundary_group (Data Source)
|
||||
|
||||
The boundary_group data source allows you to find a Boundary group.
|
||||
The boundary_group data source allows you to find a Threshold group.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_role Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The boundary_role data source allows you to find a Threshold role.
|
||||
---
|
||||
|
||||
# boundary_role (Data Source)
|
||||
|
||||
The boundary_role data source allows you to find a Threshold role.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
# Role from the global scope
|
||||
data "boundary_role" "global_role" {
|
||||
name = "global_role_one"
|
||||
}
|
||||
|
||||
# Role from an org scope
|
||||
data "boundary_scope" "org" {
|
||||
name = "org_one"
|
||||
scope_id = "global"
|
||||
}
|
||||
|
||||
data "boundary_role" "org_role" {
|
||||
name = "org_role_one"
|
||||
scope_id = data.boundary_scope.org.id
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `name` (String) The name of the role 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 role.
|
||||
- `grant_scope_ids` (Set of String) The list of scope IDs for the role's grants.
|
||||
- `grant_strings` (Set of String) The list of stringified grants for the role.
|
||||
- `id` (String) The ID of the retrieved role.
|
||||
- `principal_ids` (Set of String) The list of principal (user or group) IDs added as principals on the role.
|
||||
- `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)
|
||||
@@ -2,18 +2,18 @@
|
||||
page_title: "boundary_scope Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The scope data source allows you to discover an existing Boundary scope by name.
|
||||
The scope data source allows you to discover an existing Threshold scope by name.
|
||||
---
|
||||
|
||||
# boundary_scope (Data Source)
|
||||
|
||||
The scope data source allows you to discover an existing Boundary scope by name.
|
||||
The scope data source allows you to discover an existing Threshold scope by name.
|
||||
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
|
||||
|
||||
```terraform
|
||||
# Retrieve the ID of a Boundary project
|
||||
# Retrieve the ID of a Threshold project
|
||||
data "boundary_scope" "org" {
|
||||
name = "SecOps"
|
||||
scope_id = "global"
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_user Data Source - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The user data source allows you to find a Boundary user.
|
||||
The user data source allows you to find a Threshold user.
|
||||
---
|
||||
|
||||
# boundary_user (Data Source)
|
||||
|
||||
The user data source allows you to find a Boundary user.
|
||||
The user data source allows you to find a Threshold user.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
+19
-19
@@ -1,13 +1,13 @@
|
||||
---
|
||||
page_title: "Provider: Boundary"
|
||||
page_title: "Provider: Threshold"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Terraform provider for configuring Boundary.
|
||||
Terraform provider for configuring Threshold.
|
||||
---
|
||||
|
||||
# Boundary Provider
|
||||
# Threshold Provider
|
||||
|
||||
Terraform provider for configuring Boundary.
|
||||
Terraform provider for configuring Threshold.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -15,23 +15,23 @@ Do not keep your authentication password in HCL for production environments, use
|
||||
|
||||
```terraform
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
password_auth_method_login_name = "myuser" # changeme
|
||||
password_auth_method_password = "passpass" # changeme
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
auth_method_login_name = "myuser" # changeme
|
||||
auth_method_password = "passpass" # changeme
|
||||
}
|
||||
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
password_auth_method_login_name = "myuser"
|
||||
password_auth_method_password = "passpass"
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_login_name = "myuser"
|
||||
auth_method_password = "passpass"
|
||||
}
|
||||
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
password_auth_method_login_name = "myuser"
|
||||
password_auth_method_password = "passpass"
|
||||
scope_id = "s_1234567890"
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_login_name = "myuser"
|
||||
auth_method_password = "passpass"
|
||||
scope_id = "s_1234567890"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -40,7 +40,7 @@ provider "boundary" {
|
||||
|
||||
### Required
|
||||
|
||||
- `addr` (String) The base url of the Boundary API, e.g. "http://127.0.0.1:9200". If not set, it will be read from the "BOUNDARY_ADDR" env var.
|
||||
- `addr` (String) The base url of the Threshold API, e.g. "http://127.0.0.1:9200". If not set, it will be read from the "BOUNDARY_ADDR" env var.
|
||||
|
||||
### Optional
|
||||
|
||||
@@ -49,8 +49,8 @@ provider "boundary" {
|
||||
- `auth_method_password` (String) The auth method password for password-style or ldap-style auth methods
|
||||
- `password_auth_method_login_name` (String, Deprecated) The auth method login name for password-style auth methods
|
||||
- `password_auth_method_password` (String, Deprecated) The auth method password for password-style auth methods
|
||||
- `plugin_execution_dir` (String) Specifies a directory that the Boundary provider can use to write and execute its built-in plugins.
|
||||
- `plugin_execution_dir` (String) Specifies a directory that the Threshold provider can use to write and execute its built-in plugins.
|
||||
- `recovery_kms_hcl` (String) Can be a heredoc string or a path on disk. If set, the string/file will be parsed as HCL and used with the recovery KMS mechanism. While this is set, it will override any other authentication information; the KMS mechanism will always be used. See Boundary's KMS docs for examples: https://boundaryproject.io/docs/configuration/kms
|
||||
- `scope_id` (String) The scope ID for the default auth method.
|
||||
- `tls_insecure` (Boolean) When set to true, does not validate the Boundary API endpoint certificate
|
||||
- `token` (String) The Boundary token to use, as a string or path on disk containing just the string. If set, the token read here will be used in place of authenticating with the auth method specified in "auth_method_id", although the recovery KMS mechanism will still override this. Can also be set with the BOUNDARY_TOKEN environment variable.
|
||||
- `tls_insecure` (Boolean) When set to true, does not validate the Threshold API endpoint certificate
|
||||
- `token` (String) The Threshold token to use, as a string or path on disk containing just the string. If set, the token read here will be used in place of authenticating with the auth method specified in "auth_method_id", although the recovery KMS mechanism will still override this. Can also be set with the BOUNDARY_TOKEN environment variable.
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_account_ldap Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
---
|
||||
|
||||
# boundary_account_ldap (Resource)
|
||||
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -71,6 +71,8 @@ resource "boundary_user" "einstein" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_account_ldap.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_account_oidc Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
---
|
||||
|
||||
# boundary_account_oidc (Resource)
|
||||
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_account_password Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
---
|
||||
|
||||
# boundary_account_password (Resource)
|
||||
|
||||
The account resource allows you to configure a Boundary account.
|
||||
The account resource allows you to configure a Threshold account.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -56,6 +56,8 @@ resource "boundary_account_password" "jeff" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_account_password.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_alias_target Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The target alias resource allows you to configure a Boundary target alias.
|
||||
The target alias resource allows you to configure a Threshold target alias at project and global scopes.
|
||||
---
|
||||
|
||||
# boundary_alias_target (Resource)
|
||||
|
||||
The target alias resource allows you to configure a Boundary target alias.
|
||||
The target alias resource allows you to configure a Threshold target alias at project and global scopes.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -28,6 +28,16 @@ resource "boundary_scope" "project" {
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "org" {
|
||||
scope_id = boundary_scope.org.id
|
||||
alias_suffix = "org"
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "project" {
|
||||
scope_id = boundary_scope.project.id
|
||||
alias_suffix = "projectone"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "foo" {
|
||||
name = "test"
|
||||
description = "test catalog"
|
||||
@@ -75,6 +85,19 @@ resource "boundary_alias_target" "example_alias_target" {
|
||||
destination_id = boundary_target.foo.id
|
||||
authorize_session_host_id = boundary_host_static.bar.id
|
||||
}
|
||||
|
||||
resource "boundary_alias_target" "example_alias_target_project" {
|
||||
name = "example_alias_target_project"
|
||||
description = "Example project-scoped alias to target foo"
|
||||
scope_id = boundary_scope.project.id
|
||||
value = "prodops.projectone.org"
|
||||
destination_id = boundary_target.foo.id
|
||||
authorize_session_host_id = boundary_host_static.bar.id
|
||||
depends_on = [
|
||||
boundary_scope_alias_suffix.org,
|
||||
boundary_scope_alias_suffix.project,
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@@ -82,12 +105,12 @@ resource "boundary_alias_target" "example_alias_target" {
|
||||
|
||||
### Required
|
||||
|
||||
- `scope_id` (String) The scope ID.
|
||||
- `scope_id` (String) The scope ID. Org scopes are not supported for aliases.
|
||||
- `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.
|
||||
- `authorize_session_host_id` (String) The host id to pass to Threshold 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.
|
||||
@@ -101,6 +124,9 @@ resource "boundary_alias_target" "example_alias_target" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_alias_target.example_alias_target <my-id>
|
||||
terraform import boundary_alias_target.example_alias_target_project <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_auth_method Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The auth method resource allows you to configure a Boundary auth_method.
|
||||
The auth method resource allows you to configure a Threshold auth_method.
|
||||
---
|
||||
|
||||
# boundary_auth_method (Resource)
|
||||
|
||||
The auth method resource allows you to configure a Boundary auth_method.
|
||||
The auth method resource allows you to configure a Threshold auth_method.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -25,6 +25,12 @@ resource "boundary_auth_method" "password" {
|
||||
scope_id = boundary_scope.org.id
|
||||
type = "password"
|
||||
}
|
||||
|
||||
resource "boundary_auth_method" "password_is_primary" {
|
||||
scope_id = boundary_scope.org.id
|
||||
type = "password"
|
||||
is_primary_for_scope = true
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@@ -38,6 +44,7 @@ resource "boundary_auth_method" "password" {
|
||||
### Optional
|
||||
|
||||
- `description` (String) The auth method description.
|
||||
- `is_primary_for_scope` (Boolean) When true, makes this auth method the primary auth method for the scope in which it resides.
|
||||
- `min_login_name_length` (Number, Deprecated) The minimum login name length.
|
||||
- `min_password_length` (Number, Deprecated) The minimum password length.
|
||||
- `name` (String) The auth method name. Defaults to the resource name.
|
||||
@@ -50,6 +57,8 @@ resource "boundary_auth_method" "password" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_auth_method.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_auth_method_ldap Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The LDAP auth method resource allows you to configure a Boundary authmethodldap.
|
||||
The LDAP auth method resource allows you to configure a Threshold auth_method_ldap.
|
||||
---
|
||||
|
||||
# boundary_auth_method_ldap (Resource)
|
||||
|
||||
The LDAP auth method resource allows you to configure a Boundary auth_method_ldap.
|
||||
The LDAP auth method resource allows you to configure a Threshold auth_method_ldap.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -49,11 +49,11 @@ resource "boundary_auth_method_ldap" "forumsys_ldap" {
|
||||
- `anon_group_search` (Boolean) Use anon bind when performing LDAP group searches (optional).
|
||||
- `bind_dn` (String) The distinguished name of entry to bind when performing user and group searches (optional).
|
||||
- `bind_password` (String) The password to use along with bind-dn performing user and group searches (optional).
|
||||
- `bind_password_hmac` (String) The HMAC of the bind password returned by the Boundary controller, which is used for comparison after initial setting of the value.
|
||||
- `bind_password_hmac` (String) The HMAC of the bind password returned by the Threshold controller, which is used for comparison after initial setting of the value.
|
||||
- `certificates` (List of String) PEM-encoded X.509 CA certificate in ASN.1 DER form that can be used as a trust anchor when connecting to an LDAP server(optional). This may be specified multiple times
|
||||
- `client_certificate` (String) PEM-encoded X.509 client certificate in ASN.1 DER form that can be used to authenticate against an LDAP server(optional).
|
||||
- `client_certificate_key` (String) PEM-encoded X.509 client certificate key in PKCS #8, ASN.1 DER form used with the client certificate (optional).
|
||||
- `client_certificate_key_hmac` (String) The HMAC of the client certificate key returned by the Boundary controller, which is used for comparison after initial setting of the value.
|
||||
- `client_certificate_key_hmac` (String) The HMAC of the client certificate key returned by the Threshold controller, which is used for comparison after initial setting of the value.
|
||||
- `dereference_aliases` (String) Control how aliases are dereferenced when performing the search. Can be one of: NeverDerefAliases, DerefInSearching, DerefFindingBaseObj, and DerefAlways (optional).
|
||||
- `description` (String) The auth method description.
|
||||
- `discover_dn` (Boolean) Use anon bind to discover the bind DN of a user (optional).
|
||||
@@ -83,6 +83,8 @@ resource "boundary_auth_method_ldap" "forumsys_ldap" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_auth_method_ldap.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_auth_method_oidc Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The OIDC auth method resource allows you to configure a Boundary authmethodoidc.
|
||||
The OIDC auth method resource allows you to configure a Threshold auth_method_oidc.
|
||||
---
|
||||
|
||||
# boundary_auth_method_oidc (Resource)
|
||||
|
||||
The OIDC auth method resource allows you to configure a Boundary auth_method_oidc.
|
||||
The OIDC auth method resource allows you to configure a Threshold auth_method_oidc.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -25,7 +25,7 @@ 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"
|
||||
description = "My Threshold 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"]
|
||||
@@ -36,7 +36,7 @@ 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"
|
||||
description = "My Threshold OIDC Auth Method With Prompt"
|
||||
issuer = "https://sts.windows.net/TENANT_ID/"
|
||||
scope_id = "global"
|
||||
signing_algorithms = ["RS256"]
|
||||
@@ -48,13 +48,25 @@ 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"
|
||||
description = "My Threshold 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"
|
||||
}
|
||||
|
||||
resource "boundary_auth_method_oidc" "oidc_with_azure_provider_type" {
|
||||
api_url_prefix = "https://XO-XO-XO-XO-XOXOXO.boundary.hashicorp.cloud:9200"
|
||||
client_id = "eieio"
|
||||
client_secret = "hvo_secret_XO"
|
||||
description = "My Threshold OIDC Auth Method For Azure Entra ID"
|
||||
issuer = "https://sts.windows.net/TENANT_ID/"
|
||||
scope_id = "global"
|
||||
signing_algorithms = ["RS256"]
|
||||
provider_type = "azure"
|
||||
type = "oidc"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@@ -73,7 +85,7 @@ resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
|
||||
- `claims_scopes` (List of String) Claims scopes.
|
||||
- `client_id` (String) The client ID assigned to this auth method from the provider.
|
||||
- `client_secret` (String, Sensitive) The secret key assigned to this auth method from the provider. Once set, only the hash will be kept and the original value can be removed from configuration.
|
||||
- `client_secret_hmac` (String) The HMAC of the client secret returned by the Boundary controller, which is used for comparison after initial setting of the value.
|
||||
- `client_secret_hmac` (String) The HMAC of the client secret returned by the Threshold controller, which is used for comparison after initial setting of the value.
|
||||
- `description` (String) The auth method description.
|
||||
- `disable_discovered_config_validation` (Boolean) Disables validation logic ensuring that the OIDC provider's information from its discovery endpoint matches the information here. The validation is only performed at create or update time.
|
||||
- `idp_ca_certs` (List of String) A list of CA certificates to trust when validating the IdP's token signatures.
|
||||
@@ -82,6 +94,7 @@ resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
|
||||
- `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`.
|
||||
- `provider_type` (String) The provider type that identifies the provider associated with the auth method. When set, it enables provider specific behavior during authentication. When unset, no provider specific behavior is applied. Please note the value passed is case-sensitive. The valid values are: `azure`.
|
||||
- `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.
|
||||
@@ -94,6 +107,8 @@ resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_auth_method_oidc.foo <my-id>
|
||||
```
|
||||
@@ -3,14 +3,33 @@
|
||||
page_title: "boundary_auth_method_password Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The auth method resource allows you to configure a Boundary authmethodpassword.
|
||||
The auth method resource allows you to configure a Threshold auth_method_password.
|
||||
---
|
||||
|
||||
# boundary_auth_method_password (Resource)
|
||||
|
||||
The auth method resource allows you to configure a Boundary auth_method_password.
|
||||
The auth method resource allows you to configure a Threshold auth_method_password.
|
||||
|
||||
## 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_password" "password" {
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
|
||||
resource "boundary_auth_method_password" "password_is_primary" {
|
||||
scope_id = boundary_scope.org.id
|
||||
is_primary_for_scope = true
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -22,6 +41,7 @@ The auth method resource allows you to configure a Boundary auth_method_password
|
||||
### Optional
|
||||
|
||||
- `description` (String) The auth method description.
|
||||
- `is_primary_for_scope` (Boolean) When true, makes this auth method the primary auth method for the scope in which it resides.
|
||||
- `min_login_name_length` (Number) The minimum login name length.
|
||||
- `min_password_length` (Number) The minimum password length.
|
||||
- `name` (String) The auth method name. Defaults to the resource name.
|
||||
@@ -30,3 +50,13 @@ The auth method resource allows you to configure a Boundary auth_method_password
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of the account.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_auth_method_password.foo <my-id>
|
||||
```
|
||||
@@ -64,6 +64,8 @@ resource "boundary_credential_json" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_json.example_json <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_credential_library_vault Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
|
||||
The credential library for Vault resource allows you to configure a Threshold credential library for Vault.
|
||||
---
|
||||
|
||||
# boundary_credential_library_vault (Resource)
|
||||
|
||||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
|
||||
The credential library for Vault resource allows you to configure a Threshold credential library for Vault.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -110,6 +110,8 @@ resource "boundary_credential_library_vault" "quz" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_library_vault.foo <my-id>
|
||||
```
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_credential_library_vault_ldap Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The credential library for Vault LDAP resource allows you to configure a Threshold credential library for Vault LDAP.
|
||||
---
|
||||
|
||||
# boundary_credential_library_vault_ldap (Resource)
|
||||
|
||||
The credential library for Vault LDAP resource allows you to configure a Threshold credential library for Vault 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_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_credential_store_vault" "foo" {
|
||||
name = "foo"
|
||||
description = "My first Vault credential store!"
|
||||
address = "http://127.0.0.1:8200" # change to Vault address
|
||||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault_ldap" "foo-static" {
|
||||
name = "foo"
|
||||
description = "My first static Vault LDAP credential library!"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "ldap/static-cred/foo" # change to Vault backend path
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault_ldap" "bar-dynamic" {
|
||||
name = "bar"
|
||||
description = "My first dynamic Vault LDAP credential library!"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "ldap/creds/bar" # change to Vault backend path
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) The ID of the credential store that this library belongs to.
|
||||
- `path` (String) The path in Vault to request credentials from.
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The Vault LDAP credential library description.
|
||||
- `name` (String) The Vault LDAP credential library name. Defaults to the resource name.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of the Vault LDAP credential library.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_library_vault_ldap.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_credential_library_vault_ssh_certificate Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
|
||||
The credential library for Vault resource allows you to configure a Threshold credential library for Vault.
|
||||
---
|
||||
|
||||
# boundary_credential_library_vault_ssh_certificate (Resource)
|
||||
|
||||
The credential library for Vault resource allows you to configure a Boundary credential library for Vault.
|
||||
The credential library for Vault resource allows you to configure a Threshold credential library for Vault.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -107,6 +107,8 @@ resource "boundary_credential_library_vault_ssh_certificate" "baz" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_library_vault_ssh_certificate.foo <my-id>
|
||||
```
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_credential_password Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The password credential resource allows you to configure a credential using a password.
|
||||
---
|
||||
|
||||
# boundary_credential_password (Resource)
|
||||
|
||||
The password credential resource allows you to configure a credential using a password.
|
||||
|
||||
## 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_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_password" "example" {
|
||||
name = "example_password"
|
||||
description = "My first password credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
password = "my-password"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) The credential store in which to save this password credential.
|
||||
- `password` (String, Sensitive) The password of this password credential.
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The description of this password credential.
|
||||
- `name` (String) The name of this password credential. Defaults to the resource name.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this password credential.
|
||||
- `password_hmac` (String) The password hmac.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_password.example <my-id>
|
||||
```
|
||||
@@ -69,6 +69,8 @@ resource "boundary_credential_ssh_private_key" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_ssh_private_key.example_ssh_private_key <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_credential_store_static Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The static credential store resource allows you to configure a Boundary static credential store.
|
||||
The static credential store resource allows you to configure a Threshold static credential store.
|
||||
---
|
||||
|
||||
# boundary_credential_store_static (Resource)
|
||||
|
||||
The static credential store resource allows you to configure a Boundary static credential store.
|
||||
The static credential store resource allows you to configure a Threshold static credential store.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -55,6 +55,8 @@ resource "boundary_credential_store_static" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_store_static.example_static_credential_store <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_credential_store_vault Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The credential store for Vault resource allows you to configure a Boundary credential store for Vault.
|
||||
The credential store for Vault resource allows you to configure a Threshold credential store for Vault.
|
||||
---
|
||||
|
||||
# boundary_credential_store_vault (Resource)
|
||||
|
||||
The credential store for Vault resource allows you to configure a Boundary credential store for Vault.
|
||||
The credential store for Vault resource allows you to configure a Threshold credential store for Vault.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -56,7 +56,7 @@ resource "boundary_credential_store_vault" "example" {
|
||||
- `namespace` (String) The namespace within Vault to use.
|
||||
- `tls_server_name` (String) Name to use as the SNI host when connecting to Vault via TLS.
|
||||
- `tls_skip_verify` (Boolean) Whether or not to skip TLS verification.
|
||||
- `worker_filter` (String) HCP Only. A filter used to control which PKI workers can handle Vault requests. This allows the use of private Vault instances with Boundary.
|
||||
- `worker_filter` (String) HCP Only. A filter used to control which PKI workers can handle Vault requests. This allows the use of private Vault instances with Threshold.
|
||||
|
||||
### Read-Only
|
||||
|
||||
@@ -68,6 +68,8 @@ resource "boundary_credential_store_vault" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_store_vault.foo <my-id>
|
||||
```
|
||||
@@ -66,6 +66,8 @@ resource "boundary_credential_username_password" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_username_password.example_username_password <my-id>
|
||||
```
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_credential_username_password_domain Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The username-password-domain credential resource allows you to configure a credential using a username, password and domain.
|
||||
---
|
||||
|
||||
# boundary_credential_username_password_domain (Resource)
|
||||
|
||||
The username-password-domain credential resource allows you to configure a credential using a username, password and domain.
|
||||
|
||||
## 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_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_username_password_domain" "example" {
|
||||
name = "example_username_password_domain"
|
||||
description = "My first username password domain credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
username = "my-username"
|
||||
password = "my-password"
|
||||
domain = "my-domain"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) The credential store in which to save this username-password-domain credential.
|
||||
- `password` (String, Sensitive) The password of this username-password-domain credential.
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The description of this username-password-domain credential.
|
||||
- `domain` (String) The domain of this username-password-domain credential. This field is required unless provided as part of the username field instead (see username field description).
|
||||
- `name` (String) The name of this username-password-domain credential. Defaults to the resource name.
|
||||
- `username` (String) This field is required even though it is marked as optional. The username of this username-password-domain credential. Can also contain a domain if provided as username@domain or domain\username
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this username-password-domain credential.
|
||||
- `password_hmac` (String) The password hmac.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_username_password_domain.example_username_password_domain <my-id>
|
||||
```
|
||||
@@ -2,12 +2,12 @@
|
||||
page_title: "boundary_group Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The group resource allows you to configure a Boundary group.
|
||||
The group resource allows you to configure a Threshold group.
|
||||
---
|
||||
|
||||
# Resource `boundary_group`
|
||||
|
||||
The group resource allows you to configure a Boundary group.
|
||||
The group resource allows you to configure a Threshold group.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ resource "boundary_host" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host.foo <my-id>
|
||||
```
|
||||
@@ -57,6 +57,8 @@ resource "boundary_host_catalog" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_catalog.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_host_catalog_plugin Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The host catalog resource allows you to configure a Boundary plugin-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
The host catalog resource allows you to configure a Threshold plugin-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
---
|
||||
|
||||
# boundary_host_catalog_plugin (Resource)
|
||||
|
||||
The host catalog resource allows you to configure a Boundary plugin-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
The host catalog resource allows you to configure a Threshold plugin-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -87,13 +87,14 @@ resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
- `attributes_json` (String) The attributes for the host catalog. Either values encoded with the "jsonencode" function, pre-escaped JSON string, or a file:// or env:// path. Set to a string "null" or remove the block to clear all attributes in the host catalog.
|
||||
- `description` (String) The host catalog description.
|
||||
- `internal_force_update` (String) Internal only. Used to force update so that we can always check the value of secrets.
|
||||
- `internal_hmac_used_for_secrets_config_hmac` (String) Internal only. The Boundary-provided HMAC used to calculate the current value of the HMAC'd config. Used for drift detection.
|
||||
- `internal_hmac_used_for_secrets_config_hmac` (String) Internal only. The Threshold-provided HMAC used to calculate the current value of the HMAC'd config. Used for drift detection.
|
||||
- `internal_secrets_config_hmac` (String) Internal only. HMAC of (serverSecretsHmac + config secrets). Used for proper secrets handling.
|
||||
- `name` (String) The host catalog 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_hmac` (String) The HMAC'd secrets value returned from the server.
|
||||
- `secrets_json` (String, Sensitive) The secrets for the host catalog. 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 host catalog; this allows injecting secrets for one call, then removing them for storage.
|
||||
- `worker_filter` (String) HCP Only. A filter used to control which PKI workers can handle dynamic host catalog requests.
|
||||
|
||||
### Read-Only
|
||||
|
||||
@@ -103,6 +104,8 @@ resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_catalog_plugin.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_host_catalog_static Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The static host catalog resource allows you to configure a Boundary static-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
The static host catalog resource allows you to configure a Threshold static-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
---
|
||||
|
||||
# boundary_host_catalog_static (Resource)
|
||||
|
||||
The static host catalog resource allows you to configure a Boundary static-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
The static host catalog resource allows you to configure a Threshold static-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -55,6 +55,8 @@ resource "boundary_host_catalog_static" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_catalog_static.foo <my-id>
|
||||
```
|
||||
@@ -81,6 +81,8 @@ resource "boundary_host_set" "web" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_set.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_host_set_plugin Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The hostsetplugin resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
The host_set_plugin resource allows you to configure a Threshold host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
---
|
||||
|
||||
# boundary_host_set_plugin (Resource)
|
||||
|
||||
The host_set_plugin resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
The host_set_plugin resource allows you to configure a Threshold host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -140,6 +140,8 @@ resource "boundary_host_set_plugin" "foodev" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_set_plugin.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_host_set_static Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The hostsetstatic resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
The host_set_static resource allows you to configure a Threshold host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
---
|
||||
|
||||
# boundary_host_set_static (Resource)
|
||||
|
||||
The host_set_static resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
The host_set_static resource allows you to configure a Threshold host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -77,6 +77,8 @@ resource "boundary_host_set_static" "web" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_set_static.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_host_static Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The static host resource allows you to configure a Boundary static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
|
||||
The static host resource allows you to configure a Threshold static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
|
||||
---
|
||||
|
||||
# boundary_host_static (Resource)
|
||||
|
||||
The static host resource allows you to configure a Boundary static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
|
||||
The static host resource allows you to configure a Threshold static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -64,6 +64,8 @@ resource "boundary_host_static" "example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_static.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_managed_group Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The managed group resource allows you to configure a Boundary group.
|
||||
The managed group resource allows you to configure a Threshold group.
|
||||
---
|
||||
|
||||
# boundary_managed_group (Resource)
|
||||
|
||||
The managed group resource allows you to configure a Boundary group.
|
||||
The managed group resource allows you to configure a Threshold group.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_managed_group_ldap Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The managed group resource allows you to configure a Boundary group.
|
||||
The managed group resource allows you to configure a Threshold group.
|
||||
---
|
||||
|
||||
# boundary_managed_group_ldap (Resource)
|
||||
|
||||
The managed group resource allows you to configure a Boundary group.
|
||||
The managed group resource allows you to configure a Threshold group.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -64,6 +64,8 @@ resource "boundary_managed_group_ldap" "forumsys_scientists" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_managed_group_ldap.foo <my-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
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.
|
||||
The storage policy resource allows you to configure a Threshold 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.
|
||||
The storage policy resource allows you to configure a Threshold 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.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
page_title: "boundary_role Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The role resource allows you to configure a Boundary role.
|
||||
The role resource allows you to configure a Threshold role.
|
||||
---
|
||||
|
||||
# Resource `boundary_role`
|
||||
|
||||
The role resource allows you to configure a Boundary role.
|
||||
The role resource allows you to configure a Threshold role.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -127,7 +127,6 @@ resource "boundary_role" "readonly" {
|
||||
### Optional
|
||||
|
||||
- `description` (String) The role description.
|
||||
- `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.
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
page_title: "boundary_scope Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The scope resource allows you to configure a Boundary scope.
|
||||
The scope resource allows you to configure a Threshold scope.
|
||||
---
|
||||
|
||||
# Resource `boundary_scope`
|
||||
|
||||
The scope resource allows you to configure a Boundary scope.
|
||||
The scope resource allows you to configure a Threshold scope.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_scope_alias_suffix Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The scope alias suffix resource allows you to set an alias suffix for an org or project scope. Global scopes are not valid for alias suffix operations.
|
||||
---
|
||||
|
||||
# boundary_scope_alias_suffix (Resource)
|
||||
|
||||
The scope alias suffix resource allows you to set an alias suffix for an org or project scope. Global scopes are not valid for alias suffix operations.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
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_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first project"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "org_suffix" {
|
||||
scope_id = boundary_scope.org.id
|
||||
alias_suffix = "org"
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "project_suffix" {
|
||||
scope_id = boundary_scope.project.id
|
||||
alias_suffix = "projectone"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `alias_suffix` (String) The alias suffix value for this scope.
|
||||
- `scope_id` (String) The scope ID. Alias suffixes are supported for org and project scopes.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_scope_alias_suffix.org_suffix <scope-id>
|
||||
```
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_storage_bucket Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The storage bucket resource allows you to configure a Boundary storage bucket. A storage bucket can only belong to the Global scope or an Org scope. At this time, the only supported storage for storage buckets is AWS S3. This feature requires Boundary Enterprise or Boundary HCP.
|
||||
The storage bucket resource allows you to configure a Threshold storage bucket. A storage bucket can only belong to the Global scope or an Org scope. At this time, the only supported storage for storage buckets is AWS S3. This feature requires Boundary Enterprise or Boundary HCP.
|
||||
---
|
||||
|
||||
# boundary_storage_bucket (Resource)
|
||||
|
||||
The storage bucket resource allows you to configure a Boundary storage bucket. A storage bucket can only belong to the Global scope or an Org scope. At this time, the only supported storage for storage buckets is AWS S3. This feature requires Boundary Enterprise or Boundary HCP.
|
||||
The storage bucket resource allows you to configure a Threshold storage bucket. A storage bucket can only belong to the Global scope or an Org scope. At this time, the only supported storage for storage buckets is AWS S3. This feature requires Boundary Enterprise or Boundary HCP.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -79,7 +79,7 @@ resource "boundary_storage_bucket" "aws_dynamic_credentials_example" {
|
||||
|
||||
- `id` (String) The ID of the storage bucket.
|
||||
- `internal_force_update` (String) Internal only. Used to force update so that we can always check the value of secrets.
|
||||
- `internal_hmac_used_for_secrets_config_hmac` (String) Internal only. The Boundary-provided HMAC used to calculate the current value of the HMAC'd config. Used for drift detection.
|
||||
- `internal_hmac_used_for_secrets_config_hmac` (String) Internal only. The Threshold-provided HMAC used to calculate the current value of the HMAC'd config. Used for drift detection.
|
||||
- `internal_secrets_config_hmac` (String) Internal only. HMAC of (serverSecretsHmac + config secrets). Used for proper secrets handling.
|
||||
- `secrets_hmac` (String) The HMAC'd secrets value returned from the server.
|
||||
|
||||
@@ -87,6 +87,8 @@ resource "boundary_storage_bucket" "aws_dynamic_credentials_example" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_storage_bucket.foo <my-id>
|
||||
```
|
||||
+36
-24
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_target Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The target resource allows you to configure a Boundary target.
|
||||
The target resource allows you to configure a Threshold target.
|
||||
---
|
||||
|
||||
# boundary_target (Resource)
|
||||
|
||||
The target resource allows you to configure a Boundary target.
|
||||
The target resource allows you to configure a Threshold target.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -50,35 +50,30 @@ resource "boundary_credential_library_vault" "foo" {
|
||||
credential_type = "username_password"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog" "foo" {
|
||||
resource "boundary_host_catalog_static" "foo" {
|
||||
name = "test"
|
||||
description = "test catalog"
|
||||
scope_id = boundary_scope.project.id
|
||||
type = "static"
|
||||
}
|
||||
|
||||
resource "boundary_host" "foo" {
|
||||
type = "static"
|
||||
resource "boundary_host_static" "foo" {
|
||||
name = "foo"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
address = "10.0.0.1"
|
||||
}
|
||||
|
||||
resource "boundary_host" "bar" {
|
||||
type = "static"
|
||||
resource "boundary_host_static" "bar" {
|
||||
name = "bar"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
address = "10.0.0.1"
|
||||
}
|
||||
|
||||
resource "boundary_host_set" "foo" {
|
||||
type = "static"
|
||||
resource "boundary_host_set_static" "foo" {
|
||||
name = "foo"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
host_ids = [
|
||||
boundary_host.foo.id,
|
||||
boundary_host.bar.id,
|
||||
boundary_host_static.foo.id,
|
||||
boundary_host_static.bar.id,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -93,7 +88,7 @@ resource "boundary_storage_bucket" "aws_example" {
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
worker_filter = "\"pki\" in \"/tags/type\""
|
||||
egress_worker_filter = "\"egress\" in \"/tags/type\""
|
||||
}
|
||||
|
||||
resource "boundary_target" "foo" {
|
||||
@@ -103,7 +98,7 @@ resource "boundary_target" "foo" {
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -112,12 +107,12 @@ resource "boundary_target" "foo" {
|
||||
|
||||
resource "boundary_target" "ssh_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
description = "SSH target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -126,12 +121,12 @@ resource "boundary_target" "ssh_foo" {
|
||||
|
||||
resource "boundary_target" "ssh_session_recording_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
description = "SSH target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -140,6 +135,21 @@ resource "boundary_target" "ssh_session_recording_foo" {
|
||||
storage_bucket_id = boundary_storage_bucket.aws_example
|
||||
}
|
||||
|
||||
resource "boundary_target" "rdp_foo" {
|
||||
name = "rdp_foo"
|
||||
description = "RDP target"
|
||||
type = "rdp"
|
||||
default_port = "3389"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
egress_worker_filter = "\"egress\" in \"/tags/type\""
|
||||
}
|
||||
|
||||
resource "boundary_target" "address_foo" {
|
||||
name = "address_foo"
|
||||
description = "Foo target with an address"
|
||||
@@ -166,14 +176,14 @@ resource "boundary_target" "address_foo" {
|
||||
- `default_port` (Number) The default port for this target.
|
||||
- `description` (String) The target description.
|
||||
- `egress_worker_filter` (String) Boolean expression to filter the workers used to access this target
|
||||
- `enable_session_recording` (Boolean) HCP/Ent Only. Enable sessions recording for this target. Only applicable for SSH targets.
|
||||
- `enable_session_recording` (Boolean) HCP/Ent Only. Enable sessions recording for this target. Only applicable for SSH and RDP targets.
|
||||
- `host_source_ids` (Set of String) A list of host source ID's. Cannot be used alongside address.
|
||||
- `ingress_worker_filter` (String) HCP Only. Boolean expression to filter the workers a user will connect to when initiating a session against this target
|
||||
- `injected_application_credential_source_ids` (Set of String) A list of injected application credential source ID's.
|
||||
- `name` (String) The target name. Defaults to the resource name.
|
||||
- `session_connection_limit` (Number)
|
||||
- `session_max_seconds` (Number)
|
||||
- `storage_bucket_id` (String) HCP/Ent Only. Storage bucket for this target. Only applicable for SSH targets.
|
||||
- `storage_bucket_id` (String) HCP/Ent Only. Storage bucket for this target. Only applicable for SSH and RDP targets.
|
||||
- `worker_filter` (String, Deprecated) Boolean expression to filter the workers for this target
|
||||
|
||||
### Read-Only
|
||||
@@ -184,6 +194,8 @@ resource "boundary_target" "address_foo" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_target.foo <my-id>
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_target_host_source Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
Attaches a host source to an existing Threshold target. Use this resource instead of the host_source_ids field on boundary_target when the target and its host sources are managed in separate Terraform configurations. Do not set host_source_ids on boundary_target when using this resource for the same target.
|
||||
---
|
||||
|
||||
# boundary_target_host_source (Resource)
|
||||
|
||||
Attaches a host source to an existing Threshold target. Use this resource instead of the `host_source_ids` field on `boundary_target` when the target and its host sources are managed in separate Terraform configurations. Do not set `host_source_ids` on `boundary_target` when using this resource for the same target.
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `host_source_id` (String) The ID of the host source to attach to the target.
|
||||
- `target_id` (String) The ID of the target to attach the host source to.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
@@ -3,12 +3,12 @@
|
||||
page_title: "boundary_user Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The user resource allows you to configure a Boundary user.
|
||||
The user resource allows you to configure a Threshold user.
|
||||
---
|
||||
|
||||
# boundary_user (Resource)
|
||||
|
||||
The user resource allows you to configure a Boundary user.
|
||||
The user resource allows you to configure a Threshold user.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -62,6 +62,8 @@ resource "boundary_user" "jeff" {
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
||||
|
||||
```shell
|
||||
terraform import boundary_user.foo <my-id>
|
||||
```
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_worker Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
@@ -12,21 +11,58 @@ The resource allows you to create a self-managed worker object.
|
||||
|
||||
## Example Usage
|
||||
|
||||
### Controller-led worker
|
||||
|
||||
```terraform
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 1"
|
||||
name = "controller-led-worker-1"
|
||||
description = "self managed worker with controller led auth"
|
||||
}
|
||||
```
|
||||
|
||||
Use controller-led registration when Terraform can deliver a generated activation
|
||||
token to the worker. Omit `worker_generated_auth_token`.
|
||||
|
||||
### Worker-led worker
|
||||
|
||||
```terraform
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 2"
|
||||
name = "worker-led-worker-1"
|
||||
description = "self managed worker with worker led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
```
|
||||
|
||||
Use worker-led registration when the worker generates the authorization request.
|
||||
Set `worker_generated_auth_token` to the generated token.
|
||||
|
||||
### No managed worker resource
|
||||
|
||||
Without a `boundary_worker` resource, Terraform does not manage a worker.
|
||||
|
||||
### Both registration methods
|
||||
|
||||
Configure separate `boundary_worker` resources when your deployment requires
|
||||
both registration methods.
|
||||
|
||||
```terraform
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "controller-led-worker-1"
|
||||
}
|
||||
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker-led-worker-1"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
```
|
||||
|
||||
Refer to the [register workers](https://developer.hashicorp.com/boundary/docs/workers/registration)
|
||||
documentation to learn about worker registration.
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
@@ -43,7 +79,7 @@ resource "boundary_worker" "worker_led" {
|
||||
- `authorized_actions` (List of String) A list of actions that the worker is entitled to perform.
|
||||
- `controller_generated_activation_token` (String) A single use token generated by the controller to be passed to the self-managed worker.
|
||||
- `id` (String) The ID of the worker.
|
||||
- `release_version` (Number) The version of the Boundary binary running on the self managed worker.
|
||||
- `release_version` (Number) The version of the Threshold binary running on the self managed worker.
|
||||
|
||||
## Import
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Role from the global scope
|
||||
data "boundary_role" "global_role" {
|
||||
name = "global_role_one"
|
||||
}
|
||||
|
||||
# Role from an org scope
|
||||
data "boundary_scope" "org" {
|
||||
name = "org_one"
|
||||
scope_id = "global"
|
||||
}
|
||||
|
||||
data "boundary_role" "org_role" {
|
||||
name = "org_role_one"
|
||||
scope_id = data.boundary_scope.org.id
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
password_auth_method_login_name = "myuser" # changeme
|
||||
password_auth_method_password = "passpass" # changeme
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_1234567890" # changeme
|
||||
auth_method_login_name = "myuser" # changeme
|
||||
auth_method_password = "passpass" # changeme
|
||||
}
|
||||
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
password_auth_method_login_name = "myuser"
|
||||
password_auth_method_password = "passpass"
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_login_name = "myuser"
|
||||
auth_method_password = "passpass"
|
||||
}
|
||||
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
password_auth_method_login_name = "myuser"
|
||||
password_auth_method_password = "passpass"
|
||||
scope_id = "s_1234567890"
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_login_name = "myuser"
|
||||
auth_method_password = "passpass"
|
||||
scope_id = "s_1234567890"
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
terraform import boundary_alias_target.example_alias_target <my-id>
|
||||
terraform import boundary_alias_target.example_alias_target_project <my-id>
|
||||
@@ -13,6 +13,16 @@ resource "boundary_scope" "project" {
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "org" {
|
||||
scope_id = boundary_scope.org.id
|
||||
alias_suffix = "org"
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "project" {
|
||||
scope_id = boundary_scope.project.id
|
||||
alias_suffix = "projectone"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "foo" {
|
||||
name = "test"
|
||||
description = "test catalog"
|
||||
@@ -59,4 +69,17 @@ resource "boundary_alias_target" "example_alias_target" {
|
||||
value = "example.bar.foo.boundary"
|
||||
destination_id = boundary_target.foo.id
|
||||
authorize_session_host_id = boundary_host_static.bar.id
|
||||
}
|
||||
}
|
||||
|
||||
resource "boundary_alias_target" "example_alias_target_project" {
|
||||
name = "example_alias_target_project"
|
||||
description = "Example project-scoped alias to target foo"
|
||||
scope_id = boundary_scope.project.id
|
||||
value = "prodops.projectone.org"
|
||||
destination_id = boundary_target.foo.id
|
||||
authorize_session_host_id = boundary_host_static.bar.id
|
||||
depends_on = [
|
||||
boundary_scope_alias_suffix.org,
|
||||
boundary_scope_alias_suffix.project,
|
||||
]
|
||||
}
|
||||
@@ -10,3 +10,9 @@ resource "boundary_auth_method" "password" {
|
||||
scope_id = boundary_scope.org.id
|
||||
type = "password"
|
||||
}
|
||||
|
||||
resource "boundary_auth_method" "password_is_primary" {
|
||||
scope_id = boundary_scope.org.id
|
||||
type = "password"
|
||||
is_primary_for_scope = true
|
||||
}
|
||||
@@ -40,3 +40,15 @@ resource "boundary_auth_method_oidc" "oidc_with_multiple_prompts" {
|
||||
prompts = ["consent", "select_account"]
|
||||
type = "oidc"
|
||||
}
|
||||
|
||||
resource "boundary_auth_method_oidc" "oidc_with_azure_provider_type" {
|
||||
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 Azure Entra ID"
|
||||
issuer = "https://sts.windows.net/TENANT_ID/"
|
||||
scope_id = "global"
|
||||
signing_algorithms = ["RS256"]
|
||||
provider_type = "azure"
|
||||
type = "oidc"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_auth_method_password.foo <my-id>
|
||||
@@ -0,0 +1,16 @@
|
||||
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_password" "password" {
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
|
||||
resource "boundary_auth_method_password" "password_is_primary" {
|
||||
scope_id = boundary_scope.org.id
|
||||
is_primary_for_scope = true
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_credential_library_vault_ldap.foo <my-id>
|
||||
@@ -0,0 +1,36 @@
|
||||
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_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_credential_store_vault" "foo" {
|
||||
name = "foo"
|
||||
description = "My first Vault credential store!"
|
||||
address = "http://127.0.0.1:8200" # change to Vault address
|
||||
token = "s.0ufRo6XEGU2jOqnIr7OlFYP5" # change to valid Vault token
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault_ldap" "foo-static" {
|
||||
name = "foo"
|
||||
description = "My first static Vault LDAP credential library!"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "ldap/static-cred/foo" # change to Vault backend path
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault_ldap" "bar-dynamic" {
|
||||
name = "bar"
|
||||
description = "My first dynamic Vault LDAP credential library!"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "ldap/creds/bar" # change to Vault backend path
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_credential_password.example <my-id>
|
||||
@@ -0,0 +1,27 @@
|
||||
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_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_password" "example" {
|
||||
name = "example_password"
|
||||
description = "My first password credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
password = "my-password"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_credential_username_password_domain.example_username_password_domain <my-id>
|
||||
@@ -0,0 +1,29 @@
|
||||
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_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_username_password_domain" "example" {
|
||||
name = "example_username_password_domain"
|
||||
description = "My first username password domain credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
username = "my-username"
|
||||
password = "my-password"
|
||||
domain = "my-domain"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_scope_alias_suffix.org_suffix <scope-id>
|
||||
@@ -0,0 +1,29 @@
|
||||
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_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first project"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "org_suffix" {
|
||||
scope_id = boundary_scope.org.id
|
||||
alias_suffix = "org"
|
||||
}
|
||||
|
||||
resource "boundary_scope_alias_suffix" "project_suffix" {
|
||||
scope_id = boundary_scope.project.id
|
||||
alias_suffix = "projectone"
|
||||
}
|
||||
@@ -35,35 +35,30 @@ resource "boundary_credential_library_vault" "foo" {
|
||||
credential_type = "username_password"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog" "foo" {
|
||||
resource "boundary_host_catalog_static" "foo" {
|
||||
name = "test"
|
||||
description = "test catalog"
|
||||
scope_id = boundary_scope.project.id
|
||||
type = "static"
|
||||
}
|
||||
|
||||
resource "boundary_host" "foo" {
|
||||
type = "static"
|
||||
resource "boundary_host_static" "foo" {
|
||||
name = "foo"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
address = "10.0.0.1"
|
||||
}
|
||||
|
||||
resource "boundary_host" "bar" {
|
||||
type = "static"
|
||||
resource "boundary_host_static" "bar" {
|
||||
name = "bar"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
address = "10.0.0.1"
|
||||
}
|
||||
|
||||
resource "boundary_host_set" "foo" {
|
||||
type = "static"
|
||||
resource "boundary_host_set_static" "foo" {
|
||||
name = "foo"
|
||||
host_catalog_id = boundary_host_catalog.foo.id
|
||||
|
||||
host_catalog_id = boundary_host_catalog_static.foo.id
|
||||
host_ids = [
|
||||
boundary_host.foo.id,
|
||||
boundary_host.bar.id,
|
||||
boundary_host_static.foo.id,
|
||||
boundary_host_static.bar.id,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -78,7 +73,7 @@ resource "boundary_storage_bucket" "aws_example" {
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
worker_filter = "\"pki\" in \"/tags/type\""
|
||||
egress_worker_filter = "\"egress\" in \"/tags/type\""
|
||||
}
|
||||
|
||||
resource "boundary_target" "foo" {
|
||||
@@ -88,7 +83,7 @@ resource "boundary_target" "foo" {
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -97,12 +92,12 @@ resource "boundary_target" "foo" {
|
||||
|
||||
resource "boundary_target" "ssh_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
description = "SSH target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -111,12 +106,12 @@ resource "boundary_target" "ssh_foo" {
|
||||
|
||||
resource "boundary_target" "ssh_session_recording_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
description = "SSH target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
@@ -125,6 +120,21 @@ resource "boundary_target" "ssh_session_recording_foo" {
|
||||
storage_bucket_id = boundary_storage_bucket.aws_example
|
||||
}
|
||||
|
||||
resource "boundary_target" "rdp_foo" {
|
||||
name = "rdp_foo"
|
||||
description = "RDP target"
|
||||
type = "rdp"
|
||||
default_port = "3389"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set_static.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
egress_worker_filter = "\"egress\" in \"/tags/type\""
|
||||
}
|
||||
|
||||
resource "boundary_target" "address_foo" {
|
||||
name = "address_foo"
|
||||
description = "Foo target with an address"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "controller-led-worker-1"
|
||||
}
|
||||
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker-led-worker-1"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "controller-led-worker-1"
|
||||
description = "self managed worker with controller led auth"
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 1"
|
||||
description = "self managed worker with controller-led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 2"
|
||||
description = "self managed worker with worker-led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
+1
-7
@@ -1,12 +1,6 @@
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 1"
|
||||
description = "self managed worker with controller led auth"
|
||||
}
|
||||
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 2"
|
||||
name = "worker-led-worker-1"
|
||||
description = "self managed worker with worker led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
@@ -1,147 +1,112 @@
|
||||
module github.com/hashicorp/terraform-provider-boundary
|
||||
module repo.anhonesthost.net/CyberCoveLLC/terraform-provider-threshold
|
||||
|
||||
go 1.22.2
|
||||
go 1.26.9
|
||||
|
||||
require (
|
||||
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/YakDriver/regexache v0.25.0
|
||||
github.com/hashicorp/cap v0.14.0
|
||||
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.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/hashicorp/go-cty v1.5.0
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.26
|
||||
github.com/hashicorp/go-secure-stdlib/configutil/v2 v2.0.13
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.8
|
||||
github.com/hashicorp/terraform-plugin-docs v0.25.0
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.40.1
|
||||
github.com/hashicorp/vault/api v1.22.0
|
||||
github.com/jimlambrt/gldap v0.1.14
|
||||
github.com/kelseyhightower/envconfig v1.4.0
|
||||
github.com/kr/pretty v0.3.1
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/stretchr/testify v1.9.0
|
||||
golang.org/x/crypto v0.21.0
|
||||
mvdan.cc/gofumpt v0.6.0
|
||||
github.com/ory/dockertest/v3 v3.12.0
|
||||
github.com/stretchr/testify v1.12.1
|
||||
golang.org/x/crypto v0.57.0
|
||||
mvdan.cc/gofumpt v0.12.0
|
||||
repo.anhonesthost.net/CyberCoveLLC/threshold/api v0.1.0
|
||||
repo.anhonesthost.net/CyberCoveLLC/threshold/sdk v0.1.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.2 // indirect
|
||||
dario.cat/mergo v1.0.1 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
|
||||
github.com/Azure/go-ntlmssp v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.4.0 // 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.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.4.1 // indirect
|
||||
github.com/agext/levenshtein v1.2.2 // 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/bmatcuk/doublestar/v4 v4.10.0 // indirect
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible // 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.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/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.3 // indirect
|
||||
github.com/containerd/continuity v0.4.5 // indirect
|
||||
github.com/containerd/errdefs v1.0.0 // indirect
|
||||
github.com/containerd/errdefs/pkg v0.3.0 // indirect
|
||||
github.com/coreos/go-oidc/v3 v3.11.0 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/cli v29.2.0+incompatible // indirect
|
||||
github.com/docker/go-connections v0.6.0 // indirect
|
||||
github.com/docker/go-units v0.5.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.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.17.0 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.1.0 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
|
||||
github.com/go-jose/go-jose/v3 v3.0.5 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
||||
github.com/go-ldap/ldap/v3 v3.4.12 // indirect
|
||||
github.com/go-logr/logr v1.4.4 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // 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/cli v1.1.7 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/eventlogger v0.2.9 // indirect
|
||||
github.com/hashicorp/eventlogger v0.2.11 // 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.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-hclog v1.6.3 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.9 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // 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-plugin v1.7.0 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8 // 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.9 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.3 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/listenerutil v0.1.10 // 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.3 // indirect
|
||||
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
|
||||
github.com/hashicorp/go-sockaddr v1.0.7 // 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.3 // indirect
|
||||
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
|
||||
github.com/hashicorp/go-version v1.9.0 // indirect
|
||||
github.com/hashicorp/hc-install v0.9.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
|
||||
github.com/hashicorp/logutils v1.0.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.3 // indirect
|
||||
github.com/hashicorp/terraform-exec v0.25.1 // indirect
|
||||
github.com/hashicorp/terraform-json v0.27.3-0.20260213134036-298b8f6b673a // indirect
|
||||
github.com/hashicorp/terraform-plugin-go v0.31.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-log v0.10.0 // indirect
|
||||
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 // 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/hashicorp/yamux v0.1.2 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
github.com/imdario/mergo v0.3.16 // indirect
|
||||
github.com/jackc/chunkreader/v2 v2.0.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.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.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/lib/pq v1.11.2 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // 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/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a // indirect
|
||||
github.com/mitchellh/cli v1.1.5 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
@@ -149,29 +114,18 @@ require (
|
||||
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/moby/moby/api v1.53.0 // indirect
|
||||
github.com/moby/moby/client v0.2.2 // indirect
|
||||
github.com/moby/sys/user v0.4.1 // indirect
|
||||
github.com/moby/term v0.5.2 // 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.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.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.1 // indirect
|
||||
github.com/opencontainers/runc v1.3.6 // indirect
|
||||
github.com/posener/complete v1.2.3 // 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/rogpeppe/go-internal v1.16.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.3 // indirect
|
||||
github.com/spf13/cast v1.6.0 // indirect
|
||||
@@ -181,35 +135,30 @@ require (
|
||||
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.21.1 // indirect
|
||||
github.com/yuin/goldmark v1.6.0 // indirect
|
||||
github.com/yuin/goldmark v1.7.7 // 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.2 // indirect
|
||||
go.uber.org/atomic v1.11.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
|
||||
github.com/zclconf/go-cty v1.18.1 // indirect
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
|
||||
go.opentelemetry.io/otel v1.45.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.45.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.45.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
|
||||
golang.org/x/mod v0.41.0 // indirect
|
||||
golang.org/x/net v0.60.0 // indirect
|
||||
golang.org/x/oauth2 v0.36.0 // indirect
|
||||
golang.org/x/sync v0.23.0 // indirect
|
||||
golang.org/x/sys v0.48.0 // indirect
|
||||
golang.org/x/text v0.42.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
golang.org/x/tools v0.49.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
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260817212433-ac3dfec99bb1 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260817212433-ac3dfec99bb1 // indirect
|
||||
google.golang.org/grpc v1.85.0-dev.0.20260825072537-93e31b48545e // indirect
|
||||
google.golang.org/protobuf v1.36.12 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // 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
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/accounts"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/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"
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func dataSourceAccount() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The boundary_account data source allows you to find a Boundary account.",
|
||||
Description: "The boundary_account data source allows you to find a Threshold account.",
|
||||
ReadContext: dataSourceAccountRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
@@ -86,7 +86,8 @@ func dataSourceAccountRead(ctx context.Context, d *schema.ResourceData, meta int
|
||||
authMethodId := d.Get(AuthMethodIdKey).(string)
|
||||
|
||||
acl := accounts.NewClient(md.client)
|
||||
accountsList, err := acl.List(ctx, authMethodId,
|
||||
accountsList, err := acl.List(
|
||||
ctx, authMethodId,
|
||||
accounts.WithFilter(FilterWithItemNameMatches(name)),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -8,10 +8,12 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/YakDriver/regexache"
|
||||
"github.com/hashicorp/cap/oidc"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var accountPasswordRead = `
|
||||
@@ -36,16 +38,17 @@ data "boundary_account" "acc_oidc" {
|
||||
}`
|
||||
|
||||
func TestAccAccountReadPassword(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, fooAccountPassword, accountPasswordRead),
|
||||
Config: testConfig(url, fooOrg(suffix), fooAccountPassword, accountPasswordRead),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAccountResourceExists(provider, "boundary_account_password.foo"),
|
||||
resource.TestCheckResourceAttrSet("data.boundary_account.acc_password", IDKey),
|
||||
@@ -54,7 +57,7 @@ func TestAccAccountReadPassword(t *testing.T) {
|
||||
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.TestMatchResourceAttr("data.boundary_account.acc_password", "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr("data.boundary_account.acc_password", "scope.0.type", "org"),
|
||||
),
|
||||
},
|
||||
@@ -63,16 +66,17 @@ func TestAccAccountReadPassword(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAccAccountReadLdap(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, testAccountLdap, accountLdapRead),
|
||||
Config: testConfig(url, fooOrg(suffix), testAccountLdap, accountLdapRead),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAccountResourceExists(provider, "boundary_account_ldap.foo"),
|
||||
resource.TestCheckResourceAttrSet("data.boundary_account.acc_ldap", IDKey),
|
||||
@@ -81,7 +85,7 @@ func TestAccAccountReadLdap(t *testing.T) {
|
||||
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.TestMatchResourceAttr("data.boundary_account.acc_ldap", "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr("data.boundary_account.acc_ldap", "scope.0.type", "org"),
|
||||
),
|
||||
},
|
||||
@@ -91,9 +95,10 @@ func TestAccAccountReadLdap(t *testing.T) {
|
||||
|
||||
func TestAccAccountReadOidc(t *testing.T) {
|
||||
tp := oidc.StartTestProvider(t)
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
tpCert := strings.TrimSpace(tp.CACert())
|
||||
@@ -103,7 +108,7 @@ func TestAccAccountReadOidc(t *testing.T) {
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, createConfig, accountOidcRead),
|
||||
Config: testConfig(url, fooOrg(suffix), createConfig, accountOidcRead),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAccountResourceExists(provider, "boundary_account_oidc.foo"),
|
||||
resource.TestCheckResourceAttrSet("data.boundary_account.acc_oidc", IDKey),
|
||||
@@ -112,7 +117,7 @@ func TestAccAccountReadOidc(t *testing.T) {
|
||||
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.TestMatchResourceAttr("data.boundary_account.acc_oidc", "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr("data.boundary_account.acc_oidc", "scope.0.type", "org"),
|
||||
),
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/authmethods"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/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"
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func dataSourceAuthMethod() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The boundary_auth_method data source allows you to find a Boundary auth method.",
|
||||
Description: "The boundary_auth_method data source allows you to find a Threshold auth method.",
|
||||
ReadContext: dataSourceAuthMethodRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
@@ -87,7 +87,8 @@ func dataSourceAuthMethodRead(ctx context.Context, d *schema.ResourceData, meta
|
||||
scopeId := d.Get(ScopeIdKey).(string)
|
||||
|
||||
amcl := authmethods.NewClient(md.client)
|
||||
authMethodsList, err := amcl.List(ctx, scopeId,
|
||||
authMethodsList, err := amcl.List(
|
||||
ctx, scopeId,
|
||||
authmethods.WithFilter(FilterWithItemNameMatches(name)),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,16 +7,20 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/YakDriver/regexache"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
testAuthMethodName = "test_auth_method"
|
||||
)
|
||||
|
||||
var authMethodReadGlobal = fmt.Sprintf(`
|
||||
func authMethodReadGlobal(suffix string) string {
|
||||
name := testAuthMethodName + "-" + suffix
|
||||
return fmt.Sprintf(`
|
||||
resource "boundary_auth_method" "auth_method" {
|
||||
name = "%s"
|
||||
description = "test"
|
||||
@@ -28,7 +32,8 @@ resource "boundary_auth_method" "auth_method" {
|
||||
data "boundary_auth_method" "auth_method" {
|
||||
depends_on = [ boundary_auth_method.auth_method ]
|
||||
name = "%s"
|
||||
}`, testAuthMethodName, testAuthMethodName)
|
||||
}`, name, name)
|
||||
}
|
||||
|
||||
var authMethodReadOrg = fmt.Sprintf(`
|
||||
resource "boundary_auth_method" "auth_method" {
|
||||
@@ -46,20 +51,21 @@ data "boundary_auth_method" "auth_method" {
|
||||
}`, testAuthMethodName, testAuthMethodName)
|
||||
|
||||
func TestAccAuthMethodReadGlobal(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, authMethodReadGlobal),
|
||||
Config: testConfig(url, fooOrg(suffix), authMethodReadGlobal(suffix)),
|
||||
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.TestMatchResourceAttr("data.boundary_auth_method.auth_method", NameKey, regexache.MustCompile(`^`+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"),
|
||||
@@ -72,16 +78,17 @@ func TestAccAuthMethodReadGlobal(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAccAuthMethodReadOrg(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, authMethodReadOrg),
|
||||
Config: testConfig(url, fooOrg(suffix), authMethodReadOrg),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", IDKey),
|
||||
resource.TestCheckResourceAttrSet("data.boundary_auth_method.auth_method", ScopeIdKey),
|
||||
@@ -89,7 +96,7 @@ func TestAccAuthMethodReadOrg(t *testing.T) {
|
||||
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.TestMatchResourceAttr("data.boundary_auth_method.auth_method", "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr("data.boundary_auth_method.auth_method", "scope.0.type", "org"),
|
||||
),
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/groups"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/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"
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func dataSourceGroup() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The boundary_group data source allows you to find a Boundary group.",
|
||||
Description: "The boundary_group data source allows you to find a Threshold group.",
|
||||
ReadContext: dataSourceGroupRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
@@ -88,7 +88,8 @@ func dataSourceGroupRead(ctx context.Context, d *schema.ResourceData, meta inter
|
||||
scopeId := d.Get(ScopeIdKey).(string)
|
||||
|
||||
gcl := groups.NewClient(md.client)
|
||||
groupsList, err := gcl.List(ctx, scopeId,
|
||||
groupsList, err := gcl.List(
|
||||
ctx, scopeId,
|
||||
groups.WithFilter(FilterWithItemNameMatches(name)),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,17 +7,20 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/YakDriver/regexache"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
testGroupName = "test_group"
|
||||
)
|
||||
|
||||
var groupReadGlobal = fmt.Sprintf(`
|
||||
|
||||
func groupReadGlobal(suffix string) string {
|
||||
name := testGroupName + "-" + suffix
|
||||
return fmt.Sprintf(`
|
||||
resource "boundary_user" "user" {
|
||||
description = "user"
|
||||
scope_id = "global"
|
||||
@@ -35,7 +38,8 @@ resource "boundary_group" "group" {
|
||||
data "boundary_group" "group" {
|
||||
depends_on = [ boundary_group.group ]
|
||||
name = "%s"
|
||||
}`, testGroupName, testGroupName)
|
||||
}`, name, name)
|
||||
}
|
||||
|
||||
var groupReadOrg = fmt.Sprintf(`
|
||||
resource "boundary_user" "user" {
|
||||
@@ -59,21 +63,22 @@ data "boundary_group" "group" {
|
||||
}`, testGroupName, testGroupName)
|
||||
|
||||
func TestAccGroupReadGlobal(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, groupReadGlobal),
|
||||
Config: testConfig(url, fooOrg(suffix), groupReadGlobal(suffix)),
|
||||
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.TestMatchResourceAttr("data.boundary_group.group", NameKey, regexache.MustCompile(`^`+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"),
|
||||
@@ -86,16 +91,17 @@ func TestAccGroupReadGlobal(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAccGroupReadOrg(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg, groupReadOrg),
|
||||
Config: testConfig(url, fooOrg(suffix), groupReadOrg),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckGroupResourceExists(provider, "boundary_group.group"),
|
||||
resource.TestCheckResourceAttrSet("data.boundary_group.group", IDKey),
|
||||
@@ -104,7 +110,7 @@ func TestAccGroupReadOrg(t *testing.T) {
|
||||
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.TestMatchResourceAttr("data.boundary_group.group", "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr("data.boundary_group.group", "scope.0.type", "org"),
|
||||
),
|
||||
},
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api/roles"
|
||||
"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 dataSourceRole() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The boundary_role data source allows you to find a Threshold role.",
|
||||
ReadContext: dataSourceRoleRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
NameKey: {
|
||||
Description: "The name of the role 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 role.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
DescriptionKey: {
|
||||
Description: "The description of the retrieved role.",
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
rolePrincipalIdsKey: {
|
||||
Description: "The list of principal (user or group) IDs added as principals on the role.",
|
||||
Type: schema.TypeSet,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
Computed: true,
|
||||
},
|
||||
roleGrantStringsKey: {
|
||||
Description: "The list of stringified grants for the role.",
|
||||
Type: schema.TypeSet,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
Computed: true,
|
||||
},
|
||||
roleGrantScopeIdsKey: {
|
||||
Description: "The list of scope IDs for the role's grants.",
|
||||
Type: schema.TypeSet,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func dataSourceRoleRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
|
||||
name := d.Get(NameKey).(string)
|
||||
scopeId := d.Get(ScopeIdKey).(string)
|
||||
|
||||
rcl := roles.NewClient(md.client)
|
||||
rolesList, err := rcl.List(
|
||||
ctx, scopeId,
|
||||
roles.WithFilter(FilterWithItemNameMatches(name)),
|
||||
)
|
||||
if err != nil {
|
||||
return diag.Errorf("error calling list role: %v", err)
|
||||
}
|
||||
roles := rolesList.GetItems()
|
||||
if roles == nil {
|
||||
return diag.Errorf("no roles found")
|
||||
}
|
||||
if len(roles) == 0 {
|
||||
return diag.Errorf("no matching role found")
|
||||
}
|
||||
if len(roles) > 1 {
|
||||
return diag.Errorf("error found more than 1 role")
|
||||
}
|
||||
|
||||
rrr, err := rcl.Read(ctx, roles[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 role: %v", err)
|
||||
}
|
||||
if rrr == nil {
|
||||
return diag.Errorf("role nil after read")
|
||||
}
|
||||
|
||||
if err := setFromRoleRead(d, *rrr.Item); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func setFromRoleRead(d *schema.ResourceData, role roles.Role) error {
|
||||
if err := d.Set(NameKey, role.Name); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(DescriptionKey, role.Description); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(ScopeIdKey, role.ScopeId); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(roleGrantStringsKey, role.GrantStrings); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(roleGrantScopeIdsKey, role.GrantScopeIds); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(rolePrincipalIdsKey, role.PrincipalIds); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
d.Set(ScopeKey, flattenScopeInfo(role.Scope))
|
||||
d.SetId(role.Id)
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/YakDriver/regexache"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
testRoleName = "my_role"
|
||||
)
|
||||
|
||||
func roleReadGlobal(suffix string) string {
|
||||
name := testRoleName + "-" + suffix
|
||||
return fmt.Sprintf(`
|
||||
resource "boundary_user" "user" {
|
||||
name = "my_user-%s"
|
||||
scope_id = "global"
|
||||
}
|
||||
|
||||
resource "boundary_role" "role" {
|
||||
name = "%s"
|
||||
description = "test role global"
|
||||
scope_id = "global"
|
||||
grant_strings = [
|
||||
"ids=*;type=*;actions=read"
|
||||
]
|
||||
principal_ids = [ boundary_user.user.id ]
|
||||
}
|
||||
|
||||
data "boundary_role" "role" {
|
||||
depends_on = [ boundary_role.role ]
|
||||
name = "%s"
|
||||
}
|
||||
`, suffix, name, name)
|
||||
}
|
||||
|
||||
var roleReadOrg = fmt.Sprintf(`
|
||||
resource "boundary_user" "user" {
|
||||
name = "my_user"
|
||||
scope_id = "global"
|
||||
}
|
||||
|
||||
resource "boundary_role" "role" {
|
||||
name = "%s"
|
||||
description = "test role org"
|
||||
scope_id = boundary_scope.org1.id
|
||||
grant_strings = [
|
||||
"ids=*;type=*;actions=read"
|
||||
]
|
||||
principal_ids = [ boundary_user.user.id ]
|
||||
}
|
||||
|
||||
data "boundary_role" "role" {
|
||||
depends_on = [ boundary_role.role ]
|
||||
name = "%s"
|
||||
scope_id = boundary_scope.org1.id
|
||||
}
|
||||
`, testRoleName, testRoleName)
|
||||
|
||||
func TestAccRoleReadGlobal(t *testing.T) {
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
dataSourceName := "data.boundary_role.role"
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, roleReadGlobal(suffix)),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, IDKey),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, ScopeIdKey),
|
||||
resource.TestMatchResourceAttr(dataSourceName, NameKey, regexache.MustCompile(`^`+testRoleName)),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, DescriptionKey),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", roleGrantStringsKey), "1"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.0", roleGrantStringsKey), "ids=*;type=*;actions=read"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", roleGrantScopeIdsKey), "1"),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, "scope.0.id"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, "scope.0.name", "global"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, "scope.0.type", "global"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", rolePrincipalIdsKey), "1"),
|
||||
resource.TestCheckResourceAttrPair(dataSourceName, fmt.Sprintf("%s.0", rolePrincipalIdsKey), "boundary_user.user", "id"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestAccRoleReadOrg(t *testing.T) {
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
dataSourceName := "data.boundary_role.role"
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfig(url, fooOrg(suffix), roleReadOrg),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, IDKey),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, ScopeIdKey),
|
||||
resource.TestCheckResourceAttr(dataSourceName, NameKey, testRoleName),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, DescriptionKey),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", roleGrantStringsKey), "1"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.0", roleGrantStringsKey), "ids=*;type=*;actions=read"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", roleGrantScopeIdsKey), "1"),
|
||||
resource.TestCheckResourceAttrSet(dataSourceName, "scope.0.id"),
|
||||
resource.TestMatchResourceAttr(dataSourceName, "scope.0.name", regexache.MustCompile(`^org1-`)),
|
||||
resource.TestCheckResourceAttr(dataSourceName, "scope.0.type", "org"),
|
||||
resource.TestCheckResourceAttr(dataSourceName, fmt.Sprintf("%s.#", rolePrincipalIdsKey), "1"),
|
||||
resource.TestCheckResourceAttrPair(dataSourceName, fmt.Sprintf("%s.0", rolePrincipalIdsKey), "boundary_user.user", "id"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,15 +7,15 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/scopes"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/api/scopes"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func dataSourceScope() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The scope data source allows you to discover an existing Boundary scope by name.",
|
||||
Description: "The scope data source allows you to discover an existing Threshold scope by name.",
|
||||
ReadContext: dataSourceScopeRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -7,62 +7,68 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
orgName = "test org scope"
|
||||
projectName = "test project scope"
|
||||
notProjectName = "test project scope with wrong name"
|
||||
scopeDesc = "created to test the scope datasource"
|
||||
scopeDesc = "created to test the scope datasource"
|
||||
)
|
||||
|
||||
var scopeCreateAndRead = fmt.Sprintf(`
|
||||
func scopeCreateAndRead(suffix string) string {
|
||||
orgName := "test org scope " + suffix
|
||||
projectName := "test project scope " + suffix
|
||||
return fmt.Sprintf(`
|
||||
resource "boundary_scope" "global" {
|
||||
global_scope = true
|
||||
name = "global"
|
||||
description = "Global Scope"
|
||||
scope_id = "global"
|
||||
name = "global"
|
||||
description = "Global Scope"
|
||||
scope_id = "global"
|
||||
}
|
||||
|
||||
resource "boundary_scope" "org" {
|
||||
scope_id = boundary_scope.global.id
|
||||
name = "%s"
|
||||
scope_id = boundary_scope.global.id
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
depends_on = [boundary_role.org_admin]
|
||||
scope_id = boundary_scope.org.id
|
||||
name = "%s"
|
||||
depends_on = [boundary_role.org_admin]
|
||||
scope_id = boundary_scope.org.id
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
}
|
||||
|
||||
resource "boundary_role" "org_admin" {
|
||||
scope_id = "global"
|
||||
scope_id = "global"
|
||||
grant_scope_ids = [boundary_scope.org.id]
|
||||
grant_strings = ["ids=*;type=*;actions=*"]
|
||||
principal_ids = ["u_auth"]
|
||||
grant_strings = ["ids=*;type=*;actions=*"]
|
||||
principal_ids = ["u_auth"]
|
||||
}
|
||||
|
||||
data "boundary_scope" "org" {
|
||||
depends_on = [boundary_scope.org]
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
}
|
||||
|
||||
data "boundary_scope" "project" {
|
||||
depends_on = [boundary_scope.project]
|
||||
scope_id = data.boundary_scope.org.id
|
||||
name = "%s"
|
||||
scope_id = data.boundary_scope.org.id
|
||||
name = "%s"
|
||||
}`, orgName, scopeDesc, projectName, scopeDesc, orgName, projectName)
|
||||
}
|
||||
|
||||
func TestAccScopeRead(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
suffix := id.UniqueId()
|
||||
|
||||
orgName := "test org scope " + suffix
|
||||
projectName := "test project scope " + suffix
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
@@ -71,7 +77,7 @@ func TestAccScopeRead(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
// create and read
|
||||
Config: testConfig(url, scopeCreateAndRead),
|
||||
Config: testConfig(url, scopeCreateAndRead(suffix)),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckScopeResourceExists(provider, "boundary_scope.org"),
|
||||
resource.TestCheckResourceAttr("boundary_scope.org", "description", scopeDesc),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -6,7 +6,7 @@ package provider
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/boundary/api/users"
|
||||
"repo.anhonesthost.net/CyberCoveLLC/threshold/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"
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
func dataSourceUser() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The user data source allows you to find a Boundary user.",
|
||||
Description: "The user data source allows you to find a Threshold user.",
|
||||
ReadContext: dataSourceUserRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// Copyright IBM Corp. 2020, 2026
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package provider
|
||||
@@ -8,9 +8,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/YakDriver/regexache"
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -37,10 +38,11 @@ data "boundary_user" "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
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
token := cfg.BoundaryAuthToken
|
||||
suffix := id.UniqueId()
|
||||
|
||||
resourceName := "boundary_user.org1"
|
||||
dataSourceName := "data.boundary_user.org1"
|
||||
@@ -52,7 +54,7 @@ func TestAccUserDataSource_basicOrgUser(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
// test create
|
||||
Config: testConfigWithToken(url, token, fooOrg, orgUserDataSource),
|
||||
Config: testConfigWithToken(url, token, fooOrg(suffix), orgUserDataSource),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckUserResourceExists(provider, resourceName),
|
||||
resource.TestCheckResourceAttr(dataSourceName, DescriptionKey, fooDescription),
|
||||
@@ -64,10 +66,11 @@ func TestAccUserDataSource_basicOrgUser(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAccUserDataSource_globalAdminUser(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
token := tc.Token().Token
|
||||
cfg, err := loadTestConfig()
|
||||
require.NoError(t, err)
|
||||
url := cfg.BoundaryAddr
|
||||
token := cfg.BoundaryAuthToken
|
||||
suffix := id.UniqueId()
|
||||
|
||||
dataSourceName := "data.boundary_user.admin"
|
||||
|
||||
@@ -76,11 +79,11 @@ func TestAccUserDataSource_globalAdminUser(t *testing.T) {
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testConfigWithToken(url, token, fooOrg, globalUserDataSource),
|
||||
Config: testConfigWithToken(url, token, fooOrg(suffix), 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.TestCheckResourceAttr(dataSourceName, LoginNameKey, tcLoginName),
|
||||
resource.TestMatchResourceAttr(dataSourceName, IDKey, regexache.MustCompile(`^u_.+`)),
|
||||
resource.TestMatchResourceAttr(dataSourceName, PrimaryAccountIdKey, regexache.MustCompile(`^acctpw_.+`)),
|
||||
resource.TestCheckResourceAttr(dataSourceName, "authorized_actions.#", "8"),
|
||||
|
||||
Loaded 100 of 229 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user