diff --git a/vercel/data_source_alias.go b/vercel/data_source_alias.go index 7e443829..14fe8704 100644 --- a/vercel/data_source_alias.go +++ b/vercel/data_source_alias.go @@ -55,6 +55,7 @@ An Alias allows a ` + "`vercel_deployment` to be accessed through a different UR Attributes: map[string]schema.Attribute{ "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider.", }, "alias": schema.StringAttribute{ diff --git a/vercel/data_source_project.go b/vercel/data_source_project.go index a114aa41..2c6bb7b4 100644 --- a/vercel/data_source_project.go +++ b/vercel/data_source_project.go @@ -61,6 +61,7 @@ For more detailed information, please see the [Vercel documentation](https://ver Attributes: map[string]schema.Attribute{ "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The team ID the project exists beneath. Required when configuring a team resource if a default team has not been set in the provider.", }, "name": schema.StringAttribute{ diff --git a/vercel/resource_alias.go b/vercel/resource_alias.go index 07da776e..76594fee 100644 --- a/vercel/resource_alias.go +++ b/vercel/resource_alias.go @@ -68,8 +68,9 @@ An Alias allows a ` + "`vercel_deployment` to be accessed through a different UR }, "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider.", - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace()}, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured()}, }, "id": schema.StringAttribute{ Computed: true, diff --git a/vercel/resource_deployment.go b/vercel/resource_deployment.go index c7fe4678..84697b99 100644 --- a/vercel/resource_deployment.go +++ b/vercel/resource_deployment.go @@ -92,7 +92,8 @@ terraform to your Deployment. "team_id": schema.StringAttribute{ Description: "The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.", Optional: true, - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + Computed: true, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, }, "project_id": schema.StringAttribute{ Description: "The project ID to add the deployment to.", diff --git a/vercel/resource_dns_record.go b/vercel/resource_dns_record.go index 81f8cdaf..f7c351d7 100644 --- a/vercel/resource_dns_record.go +++ b/vercel/resource_dns_record.go @@ -66,8 +66,9 @@ For more detailed information, please see the [Vercel documentation](https://ver }, "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.", - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, }, "domain": schema.StringAttribute{ Description: "The domain name, or zone, that the DNS record should be created beneath.", diff --git a/vercel/resource_project.go b/vercel/resource_project.go index ce7f1e37..d111eceb 100644 --- a/vercel/resource_project.go +++ b/vercel/resource_project.go @@ -69,7 +69,8 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ Attributes: map[string]schema.Attribute{ "team_id": schema.StringAttribute{ Optional: true, - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + Computed: true, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, Description: "The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.", }, "name": schema.StringAttribute{ diff --git a/vercel/resource_project_domain.go b/vercel/resource_project_domain.go index e6a6fa56..f91962b5 100644 --- a/vercel/resource_project_domain.go +++ b/vercel/resource_project_domain.go @@ -66,7 +66,8 @@ By default, Project Domains will be automatically applied to any ` + "`productio }, "team_id": schema.StringAttribute{ Optional: true, - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + Computed: true, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, Description: "The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.", }, "id": schema.StringAttribute{ diff --git a/vercel/resource_project_environment_variable.go b/vercel/resource_project_environment_variable.go index 8fbb7acf..604c07c1 100644 --- a/vercel/resource_project_environment_variable.go +++ b/vercel/resource_project_environment_variable.go @@ -94,8 +94,9 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ }, "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.", - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, }, "id": schema.StringAttribute{ Description: "The ID of the Environment Variable.", diff --git a/vercel/resource_shared_environment_variable.go b/vercel/resource_shared_environment_variable.go index 9dbbfc21..5ea50417 100644 --- a/vercel/resource_shared_environment_variable.go +++ b/vercel/resource_shared_environment_variable.go @@ -87,8 +87,9 @@ For more detailed information, please see the [Vercel documentation](https://ver }, "team_id": schema.StringAttribute{ Optional: true, + Computed: true, Description: "The ID of the Vercel team. Shared environment variables require a team.", - PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, + PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplaceIfConfigured(), stringplanmodifier.UseStateForUnknown()}, }, "id": schema.StringAttribute{ Description: "The ID of the Environment Variable.",