Skip to content

Commit

Permalink
PATCH: update setup attribute schema for `auth0_flow_vault_connecti…
Browse files Browse the repository at this point in the history
…on` (#1103)

* Update schema for read-on fields

* updated docs
  • Loading branch information
duedares-rvj authored Dec 17, 2024
1 parent 9dc3b24 commit fa6b9bd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/resources/flow_vault_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ resource "auth0_flow_vault_connection" "my_connection" {
- `account_name` (String) Custom account name of the vault connection.
- `environment` (String) Environment of the vault connection.
- `fingerprint` (String) Fingerprint of the vault connection.
- `ready` (Boolean) Indicates if the vault connection is configured.
- `setup` (Map of String, Sensitive) Configuration of the vault connection. (Mapping information must be provided as key/value pairs)

### Read-Only

- `id` (String) The ID of this resource.
- `ready` (Boolean) Indicates if the vault connection is configured.

## Import

Expand Down
4 changes: 0 additions & 4 deletions internal/auth0/flow/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ func expandVaultConnection(data *schema.ResourceData) (*management.FlowVaultConn
vaultConnection.AccountName = value.String(cfg.GetAttr("account_name"))
}

if data.HasChange("ready") {
vaultConnection.Ready = value.Bool(cfg.GetAttr("ready"))
}

return vaultConnection, nil
}

Expand Down
1 change: 0 additions & 1 deletion internal/auth0/flow/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func flattenVaultConnection(data *schema.ResourceData, vaultConnection *manageme
data.Set("name", vaultConnection.GetName()),
data.Set("app_id", vaultConnection.GetAppID()),
data.Set("environment", vaultConnection.GetEnvironment()),
data.Set("setup", vaultConnection.GetSetup()),
data.Set("account_name", vaultConnection.GetAccountName()),
data.Set("ready", vaultConnection.GetReady()),
data.Set("fingerprint", vaultConnection.GetFingerprint()),
Expand Down
6 changes: 2 additions & 4 deletions internal/auth0/flow/resource_vault_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ func NewVaultConnectionResource() *schema.Resource {
Optional: true,
Description: "Configuration of the vault connection. (Mapping information must be provided as key/value pairs)",
Sensitive: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Elem: schema.TypeString,
},
"account_name": {
Type: schema.TypeString,
Expand All @@ -79,7 +77,7 @@ func NewVaultConnectionResource() *schema.Resource {
},
"ready": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Description: "Indicates if the vault connection is configured.",
},
"fingerprint": {
Expand Down

0 comments on commit fa6b9bd

Please sign in to comment.