msp: fix tfc workspace sync on services with private images (#59196)

We generate all stacks to get a list of stacks for which we need TFC workspaces - we need to do this in "stable mode" to avoid image access on subscription types (same thing we do for CI)
This commit is contained in:
Robert Lin 2023-12-22 09:50:20 -08:00 committed by GitHub
parent 1d22b46f59
commit bb12ca2eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,8 @@ func syncEnvironmentWorkspaces(c *cli.Context, tfc *terraformcloud.Client, servi
TFC: managedservicesplatform.TerraformCloudOptions{
Enabled: true, // required to generate all workspaces
},
// Avoid external resource access
StableGenerate: true,
}
defer os.RemoveAll(renderer.OutputDir)