To resolve that issue, it may be necessary to develop some mechanism (inside TF files), so that every GCP resource, described in those files, gets the name (which must be unique in the GCP project) according to (functionally dependent on) the git branch name, so that there is no interference between resources deployed from different git branches. I think that the old workspace state file is kept as is (untouched, unmodified). WASHINGTON The Trump administration on Thursday finalized a rule to strip away environmental protections for streams, wetlands and groundwater, handing a. Under assumption that inside your terraform files (this is my guess, as there are no terraform files in the original question), you don't handle dependency - GCP resource name as a function of a git branch (for different branches the deployed resources should have different names) - I guess that a new workspace deployment ( apply) compares what already exist in a project with what is described in TF files, and with is recorded in thee state file (empty for a new workspace), and makes a decision to recreate all resources and record that in the new workspace state file. For example, I cannot create 2 pubsub topic with identical names, or create 2 cloud functions with identical names, etc. In majority of cases, GCP project is a "resource naming scope" - it means that one cannot create more than one resource (of a given type) with the chosen name in one GCP project. I understand that you would like to deploy GCP resources from different git branches into one GCP project. Thus workspaces are only about state files (naming). I know you're able to specify a specific workspace in the tf backend config, but since these workspaces are dynamic, I'd been hoping that setting the workspace via the CLI would set some kind of namespace in the uploaded remote state and take care of the separation.ĮDIT Just to confirm that I am naming all of my components differently, with the current branch name as a suffix, but TF will still destroy components created when a different branch was run.įrom the best of my understanding, terraform workspaces allow you to store Terraform state in multiple, separate, named (state) files. Ephemeral lake basins may be vegetated or completely devoid of vegetation. Ephemeral ponds are sporadic aquatic systems that are inundated by large rain events. My Cloud Build pipeline works but terraform apply doesn't seem to be honouring the workspace I'm trying to set, in that resources from the previous builds are destroyed, even if they were supposed to be in another workspace.Īrgs: Īm I missing something about workspaces? It would seem they're not really being reflected in the remote state. 8.13 Ephemeral Ponds and Lakes Ephemeral ponds or lakes also known as playas, pans, chottes, and sebkas are common features of arid and semiarid regions ( Crawford, 1981). As the title says, trying to leverage Cloud Build and Terraform workspaces to create arbitrary ephemeral environments in the same GCP project, mapping to a branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |