Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tags to append DeploymentType in terraform #422

Merged
merged 5 commits into from
Sep 22, 2021
Merged

Conversation

lisamurphy-msft
Copy link
Contributor

@lisamurphy-msft lisamurphy-msft commented Sep 20, 2021

Description

Appended the tag DeploymentType: MissionLandingZoneTF for terraform deployments to resources deployed using this method.

Issue reference

The issue this PR will close: #85

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles or validates correctly
  • BASH scripts have been validated using shellcheck
  • All tests pass (manual and automated)
  • Relevant issues are linked to this PR

src/terraform/mlz/variables.tf Outdated Show resolved Hide resolved
@brooke-hamilton brooke-hamilton self-assigned this Sep 21, 2021
description = "A map of key value pairs to apply as tags to resources provisioned in this deployment"
type = map(string)
default = {
"DeploymentName" : "mlz-dev",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does deployment name mean, or what is it used for? I think the acceptance criteria are met without this tag but if it's a useful tag then I'm all for it. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a pre-existing artifact. I don't think it is used for anything, will take deploymentname out and test and post new changes momentarily.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tag was previously used to track the value set with the -z option of deploy.sh (which currently is still used to tag some of the pre-Terraform resources like the RGs for config and TF state, and used by the clean.sh script to remove those resources.) But I think it's going to end up being not required for the resources deployed by Terraform.

Thanks for testing this! I think removing it should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to be used to some extent in
src/scripts/terraform/create_tfvars_from_config.sh:51
append_kvp "deploymentname" "${mlz_env_name}"
But as stated looks like deploymentname actually maps to a different value mlz_env_name
It's current use as a tag is ineffectual but in the midst of confirming now.

@lisamurphy-msft
Copy link
Contributor Author

Testing confirmed, removal of the DeploymentName tag did not effect the deployment or the cleanup of terraform resources.

@glennmusa glennmusa merged commit 5052d0f into main Sep 22, 2021
@glennmusa glennmusa deleted the issue-85-temp branch September 22, 2021 14:18
jwaltireland pushed a commit to ARPA-H/AzureMissionLZ that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automated deployments should be uniquely identifiable with tags
3 participants