Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

[SYM-4806] Add an optional iam_role_name input #1

Merged
merged 3 commits into from
May 9, 2023

Conversation

llam15
Copy link
Contributor

@llam15 llam15 commented May 4, 2023

Summary

  • Adds an optional iam_role_name input. If one is specified, then the generated IAM Policy will be attached to that AWS IAM Role

Testing

Tested with the following main.tf

terraform {
  required_version = ">= 1.0.7"
  required_providers {
    sym = {
      source  = "symopsio/sym"
      version = ">= 2.0"
    }
    aws = {
      source  = "hashicorp/aws"
      version = ">= 3.0"
    }
  }
}

locals {
  environment = "leslie"
}

provider "aws" {
  region = "us-east-1"
}

provider "sym" {
  org = "sym"
}

module "runtime_connector" {
  source  = "[email protected]:symopsio/terraform-aws-runtime-connector.git?ref=leslie/sym-4763-create-runtime-connector-v2x"

  environment = local.environment

  sym_account_id = "906191524257"
}

module "kinesis_data_stream" {
  source = "../terraform-aws-kinesis-data-stream-addon"

  environment = local.environment
  stream_arns = ["arn:aws:kinesis:*:111122223333:stream/my-stream"]
  iam_role_name = module.runtime_connector.sym_runtime_connector_role.name
}

Tested with both the iam_role_name specified and unspecified.
Verified that the policy is attached if iam_role_name is specified, otherwise only the policy is declared.

@llam15
Copy link
Contributor Author

llam15 commented May 4, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@llam15 llam15 requested a review from a team May 4, 2023 21:10
@linear
Copy link

linear bot commented May 4, 2023

SYM-4806 Update add-ons to accept a runtime_role_name input

The add-ons currently don't attach the policies they generate to a role.

For each add-on module, add an optional input variable runtime_role_name. if it's passed in, then the policy will be attached to the role

variables.tf Outdated Show resolved Hide resolved
@Arianna2028 Arianna2028 merged commit 51a593f into main May 9, 2023
@Arianna2028 Arianna2028 deleted the leslie/sym-4806-update-add-ons-to-accept-a branch May 9, 2023 20:55
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