-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: s2s auth iam engine #237
base: main
Are you sure you want to change the base?
Conversation
/run pipeline |
/run pipeline |
1 similar comment
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
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.
see comments
variables.tf
Outdated
@@ -27,6 +27,12 @@ variable "sm_service_plan" { | |||
} | |||
} | |||
|
|||
variable "create_iam_engine" { |
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 only thing getting "created" here is s2s auth policies between SM and IAM. So maybe we need to rename this to skip_iam_authorization_policy
?
The variable description needs to be more specific as to what exact type of auth policies are created (as its possible a consumer may already have them set in their account)
main.tf
Outdated
target_service_name = "iam-identity" | ||
roles = ["Operator"] | ||
description = "Authorization Policy" | ||
transaction_id = "terraformAuthorizationPolicy" |
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.
what is transaction_id
?
main.tf
Outdated
source_resource_instance_id = local.secrets_manager_guid | ||
target_service_name = "iam-identity" | ||
roles = ["Operator"] | ||
description = "Authorization Policy" |
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 description needs more info as to the type of auth policy here. Check out other auth policy descrptions we have used in other modules for an idea
main.tf
Outdated
source_resource_instance_id = local.secrets_manager_guid | ||
target_service_name = "iam-groups" | ||
roles = ["Groups Service Member Manage"] | ||
description = "Authorization Policy" |
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.
same as above, description needs to be updated
/run pipeline |
/run pipeline |
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.
see comments
secrets_manager_name = "${var.prefix}-secrets-manager" #tfsec:ignore:general-secrets-no-plaintext-exposure | ||
sm_service_plan = "trial" | ||
sm_tags = var.resource_tags | ||
skip_iam_authorization_policy = true |
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.
why are you skipping?
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.
We already have this auth policy in the account, so it fails because it can't make a duplicate.
variables.tf
Outdated
@@ -27,6 +27,12 @@ variable "sm_service_plan" { | |||
} | |||
} | |||
|
|||
variable "skip_iam_authorization_policy" { | |||
type = bool | |||
description = "Skip creating 2 auth policies, one between this Secrets Manager instance and the IAM Identity service and the other between this Secrets Manager instance and the IAM Groups service to enable creation of IAM credentials." |
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.
Whether to skip the creation of the IAM authorization policies required to enable the IAM credentials engine. If set to false, a policies will be created that grants the Secrets Manager instance Operator access to the IAM identity service, and Groups Service Member Manage access to the IAM groups service.
Description
Adding IAM engine to the main module. It is also the new default behavior. Not sure if this should qualify for a major release.
Issue: terraform-ibm-modules/terraform-ibm-secrets-manager-iam-engine#139
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers