Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable resource #7

Merged
merged 11 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/code-check-and-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
echo "\"make terrafmtlint\" before submitting the code for review."; \
exit 1; \
fi
acceptance:
acceptancemockservice:
name: Acceptance Tests
needs:
[fmt, vet, lint, generate, importfmt, tfproviderlint, tflint, terrafmt]
Expand All @@ -156,7 +156,28 @@ jobs:
with:
terraform_version: "1.4.*"
terraform_wrapper: false
- run: make testacc
- run: make testaccmockservice
env:
TF_ACC: "1"
CONFIG: ${{ secrets.Config }}
# Uncomment to enable acceptance tests on the real service
# acceptance:
# name: Acceptance Tests
# needs:
# [fmt, vet, lint, generate, importfmt, tfproviderlint, tflint, terrafmt]
# if: ${{ github.actor != 'dependabot[bot]' }}
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version-file: "go.mod"
# cache: true
# - uses: hashicorp/setup-terraform@v3
# with:
# terraform_version: "1.4.*"
# terraform_wrapper: false
# - run: make testacc
# env:
# TF_ACC: "1"
# CONFIG: ${{ secrets.Config }}
30 changes: 28 additions & 2 deletions .github/workflows/scheduled-acctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 7 * * *"

jobs:
acceptance:
acceptancemockservice:
name: Acceptance Tests
runs-on: ubuntu-20.04
strategy:
Expand All @@ -27,7 +27,33 @@ jobs:
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: make testacc
- run: make testaccmockservice
env:
TF_ACC: "1"
CONFIG: ${{ secrets.Config }}
# Uncomment to enable acceptance tests on the real service
# acceptance:
# name: Acceptance Tests
# runs-on: ubuntu-20.04
# strategy:
# fail-fast: false
# matrix:
# terraform:
# - "1.4.*"
# - "1.5.*"
# - "1.6.*"
# max-parallel: 1
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version-file: "go.mod"
# cache: true
# - uses: hashicorp/setup-terraform@v3
# with:
# terraform_version: ${{ matrix.terraform }}
# terraform_wrapper: false
# - run: make testacc
# env:
# TF_ACC: "1"
# CONFIG: ${{ secrets.Config }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ fmt:
vet:
go vet ./...

testaccmockservice:
PINGAIC_TF_TEST_MOCK_SERVICE=true PINGAIC_TF_TENANT_ENV_FQDN= TF_ACC=1 go test ./internal/... -timeout 10m -v -count=1

testacc:
TF_ACC=1 go test ./internal/... -timeout 10m -v -count=1

Expand Down
8 changes: 3 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
page_title: "identitycloud Provider"
subcategory: ""
description: |-

The PingOne Advanced Identity Cloud provider is used to manage Advanced Identity Cloud tenants.
---

# identitycloud Provider



# PingOne Advanced Identity Cloud Provider

The PingOne Advanced Identity Cloud provider is used to manage Advanced Identity Cloud tenants.

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
50 changes: 50 additions & 0 deletions docs/resources/variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "identitycloud_variable Resource - terraform-provider-identitycloud"
subcategory: ""
description: |-
Resource to create and manage a variable. Variables are used to set configuration values that need to be different for each tenant environment. They should not contain secrets.
---

# identitycloud_variable (Resource)

Resource to create and manage a variable. Variables are used to set configuration values that need to be different for each tenant environment. They should not contain secrets.

## Example Usage

```terraform
resource "identitycloud_variable" "example" {
variable_id = "esv-myvariable1"
description = "My variable"
expression_type = "list"
value_base64 = "ZGF0YQ=="
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `value_base64` (String) Base64 encoded value of the variable.
- `variable_id` (String) ID of the variable

### Optional

- `description` (String) Description of the variable.
- `expression_type` (String) The type of variable expression. Supported values are `string`, `list`, `array`, `object`, `bool`, `int`, `number`, `base64encodedinlined`, `keyvaluelist`.

### Read-Only

- `id` (String) ID of the variable.
- `last_change_date` (String) Date the variable was last changed.
- `last_changed_by` (String) User who last changed the variable.
- `loaded` (Boolean) Indicates if the variable is loaded.

## Import

Import is supported using the following syntax:

```shell
terraform import identitycloud_variable.example variable_id
```
Empty file removed examples/.placeholder
Empty file.
1 change: 1 addition & 0 deletions examples/resources/identitycloud_variable/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import identitycloud_variable.example variable_id
6 changes: 6 additions & 0 deletions examples/resources/identitycloud_variable/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "identitycloud_variable" "example" {
variable_id = "esv-myvariable1"
description = "My variable"
expression_type = "list"
value_base64 = "ZGF0YQ=="
}
Loading
Loading