From 3ff33a9e6af4ec025b80e1bd399fa95d9284ea05 Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Tue, 17 Dec 2024 12:16:29 +0530 Subject: [PATCH] Update schema for read-on fields --- internal/auth0/flow/expand.go | 4 ---- internal/auth0/flow/flatten.go | 1 - internal/auth0/flow/resource_vault_connection.go | 6 ++---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/auth0/flow/expand.go b/internal/auth0/flow/expand.go index c1a5fd66..e5434cb9 100644 --- a/internal/auth0/flow/expand.go +++ b/internal/auth0/flow/expand.go @@ -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 } diff --git a/internal/auth0/flow/flatten.go b/internal/auth0/flow/flatten.go index 057a8186..8cb95ddf 100644 --- a/internal/auth0/flow/flatten.go +++ b/internal/auth0/flow/flatten.go @@ -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()), diff --git a/internal/auth0/flow/resource_vault_connection.go b/internal/auth0/flow/resource_vault_connection.go index 118b82a9..88cb7aee 100644 --- a/internal/auth0/flow/resource_vault_connection.go +++ b/internal/auth0/flow/resource_vault_connection.go @@ -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, @@ -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": {