-
Notifications
You must be signed in to change notification settings - Fork 6
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
Updating dev dns manager AWS role #1538
Conversation
@@ -157,21 +157,23 @@ resource "aws_iam_role" "dev_dns_manager" { | |||
count = var.env == "staging" ? 1 : 0 | |||
name = "dev_dns_manager_role" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The count
argument is set to 1 only if var.env
is staging
. If the intention is to update the dev DNS manager role, ensure that this condition aligns with the intended environment. Otherwise, consider adjusting the condition to include the development environment.
Principal = { | ||
AWS = [ | ||
"800095993820", | ||
"arn:aws:iam::800095993820:role/notification-terraform-apply", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ARN arn:aws:sts::800095993820:assumed-role/notification-terraform-plan/NotifyTerraformPlan
seems to be an assumed role ARN. Verify that this ARN is correct and intended for the Principal
section.
Staging: dns✅ Terraform Init: Plan: 0 to add, 1 to change, 0 to destroy Show summary
Show planResource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# aws_iam_role.dev_dns_manager[0] will be updated in-place
~ resource "aws_iam_role" "dev_dns_manager" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Principal = {
~ AWS = "800095993820" -> [
+ "800095993820",
+ "arn:aws:iam::800095993820:role/notification-terraform-apply",
+ "arn:aws:iam::800095993820:role/notification-terraform-plan",
+ "arn:aws:sts::800095993820:assumed-role/notification-terraform-plan/NotifyTerraformPlan",
]
}
- Sid = ""
# (2 unchanged attributes hidden)
},
]
# (1 unchanged attribute hidden)
}
)
id = "dev_dns_manager_role"
name = "dev_dns_manager_role"
tags = {}
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.internal_dns"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.dev_dns_manager[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.production_dns_manager[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.sandbox_dns_manager[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.scratch_dns_manager[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.staging_dns_manager[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_zone.internal_dns"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_zone.notification-sandbox[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.internal_dns_cert_base64"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.internal_dns_fqdn"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.internal_dns_key_base64"]
30 tests, 19 passed, 11 warnings, 0 failures, 0 exceptions
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I'll use variables for the account ids in my PR once i pull this in :)
Yeah I was lazy and wanted to make sure this worked first |
Summary | Résumé
This will hopefully allow github dev plan to talk to staging DNS
Related Issues | Cartes liées
TF Var environment consolidation
Before merging this PR
Read code suggestions left by the
cds-ai-codereviewer bot. Address
valid suggestions and shortly write down reasons to not address others. To help
with the classification of the comments, please use these reactions on each of the
comments made by the AI review:
The classifications will be extracted and summarized into an analysis of how helpful
or not the AI code review really is.
Test instructions | Instructions pour tester la modification
TF Apply works
Test TF plan in environment consolidation branch
Release Instructions | Instructions pour le déploiement
None.
Reviewer checklist | Liste de vérification du réviseur