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

add parameter store item for oidc provider #1249

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions security/org-account-context/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ module "aws_iam_oidc_provider" {
}
}

module "aws_iam_oidc_provider_ssm" { # Add SSM parameter for OIDC provider URL TODO: Test!
source = "../../_sub/security/ssm-parameter-store"
providers = {
aws = aws.workload
}
key_name = "/managed/cluster/oidc-provider"
key_description = "OIDC Provider URL for EKS cluster"
key_value = var.oidc_provider_url
tag_createdby = var.ssm_param_createdby
}

# --------------------------------------------------
# aws_context_account_created event
# --------------------------------------------------
Expand Down Expand Up @@ -284,7 +295,7 @@ module "github_oidc_provider" {
locals {
deploy_kms_key = false
kms_key_admins = [module.org_account.org_role_arn]
}
}

resource "aws_iam_role" "backup" {
provider = aws.workload
Expand Down Expand Up @@ -322,7 +333,7 @@ module "backup_eu_central_1" {
kms_key_admins = local.kms_key_admins
backup_plans = var.aws_backup_plans
iam_role_arn = aws_iam_role.backup[0].arn
tags = var.aws_backup_tags
tags = var.aws_backup_tags
}

module "backup_eu_west_1" {
Expand All @@ -339,5 +350,5 @@ module "backup_eu_west_1" {
kms_key_admins = local.kms_key_admins
backup_plans = var.aws_backup_plans
iam_role_arn = aws_iam_role.backup[0].arn
tags = var.aws_backup_tags
tags = var.aws_backup_tags
}
6 changes: 6 additions & 0 deletions security/org-account-context/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,9 @@ variable "tags" {
description = "A map of tags to apply to all the resources deployed by the module"
default = {}
}


variable "ssm_param_createdby" {
type = string
description = "The value that will be used for the createdBy key when tagging any SSM parameters"
}
Loading