Skip to content

feat: Refactor to use SSM ARNs directly from resources #135

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

Merged
merged 3 commits into from
Jun 20, 2020

Conversation

DrFaust92
Copy link
Contributor

Description

remove the aws_ssm_path variable to get full proper ARN from SSM resources instead of building it manually

Motivation and Context

Breaking Changes

NONE

How Has This Been Tested?

Run with the sample tfvars, added the changes and re-run to get no diffs (aside from regular ECS diff)

@DrFaust92 DrFaust92 requested a review from antonbabenko June 20, 2020 11:45
@DrFaust92 DrFaust92 changed the title Refactor to use SSM ARNs directly from resources feat: Refactor to use SSM ARNs directly from resources Jun 20, 2020
main.tf Outdated
"arn:${var.aws_ssm_path}:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter${var.atlantis_gitlab_user_token_ssm_parameter_name}",
"arn:${var.aws_ssm_path}:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter${var.atlantis_bitbucket_user_token_ssm_parameter_name}",
]
resources = coalescelist(
Copy link
Member

Choose a reason for hiding this comment

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

This will find the first non-empty list.

Maybe unrelated question... Is it possible to make this module work for multiple types of VCS at the same time with little or no changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed this with bt replacing coalescelist with flatten(list()) this works fine for create. but it didnt seem to work right with update. it only saw diff for update the second run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to the other question, i don't think so... there are things like secret_name_key that are specific to the input and will default to one of the first parameters that are listed

@antonbabenko antonbabenko merged commit 6b4c314 into terraform-aws-modules:master Jun 20, 2020
@antonbabenko
Copy link
Member

Thanks, @DrFaust92 !

v2.18.0 has been just released.

@DrFaust92 DrFaust92 deleted the ssm-arns branch July 15, 2020 06:48
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants