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

[terraform-ibm-event-notifications] Add support to create KMS key in external account #213

Closed
ocofaigh opened this issue Jun 5, 2024 · 1 comment
Assignees

Comments

@ocofaigh
Copy link
Member

ocofaigh commented Jun 5, 2024

Changes should go into solutions/standard only..

  • Add new optional variable ibmcloud_kms_api_key. This should be used in a new provider block like so:

    provider "ibm" {
      alias            = "kms"
      ibmcloud_api_key = var.ibmcloud_kms_api_key != null ? var.ibmcloud_kms_api_key : var.ibmcloud_api_key
      region           = local.kms_region # this value should be parsed from the existing KMS CRN 
    }
    
    provider "ibm" {
      ibmcloud_api_key = var.ibmcloud_api_key
      region           = var.region
    }
    
  • The kms module block should use the kms provider alias.

  • Support creating cross account s2s auth policy (in KMS account):

    • if value for ibmcloud_kms_api_key is passed, and skip_iam_authorization_policy is set to false, then create a cross account s2s auth policy in the KMS account to allow the exact Event Notification instance GUID reader access to the KMS instance GUID in the KMS account.
    • Ensure that if doing cross account auth policy, the skip_iam_authorization_policy value thats passed to the EN module itself is set to true since we will create the cross account one in the DA itself.
  • Review all of the variable descriptions and readme markdowns to ensure its clear that it supports KMS in a different account using the ibmcloud_kms_api_key variable.

@kierramarie
Copy link
Contributor

PR has been merged. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants