diff --git a/.changelog/1132.txt b/.changelog/1132.txt new file mode 100644 index 000000000..d8164561f --- /dev/null +++ b/.changelog/1132.txt @@ -0,0 +1,4 @@ +```release-note:fix account_id becoming null in platform_gitops_agent after deprecation +platform_gitops_agent: there was a deprecation of account_id in all harness gitops resources. this introduced a bug in agent resource where +it was not being set at all after it was changed to computed: true. +``` diff --git a/internal/service/platform/gitops/agent/resource_gitops_agent.go b/internal/service/platform/gitops/agent/resource_gitops_agent.go index 4a94836c9..8f8d15d76 100644 --- a/internal/service/platform/gitops/agent/resource_gitops_agent.go +++ b/internal/service/platform/gitops/agent/resource_gitops_agent.go @@ -319,6 +319,7 @@ func buildCreateAgentRequest(d *schema.ResourceData) *nextgen.V1Agent { func readAgent(d *schema.ResourceData, agent *nextgen.V1Agent) { d.SetId(agent.Identifier) + d.Set("account_id", agent.AccountIdentifier) d.Set("identifier", agent.Identifier) d.Set("name", agent.Name) d.Set("description", agent.Description)