#terraform-aws-modules - April 2024

jaysun
jaysunover 2 years ago
how are folks handing permissionsets defining permissions for teams that have varying levels of access to multiple accounts?

for example, say we have a business intelligence team.

we create a business intelligence permission set and create that in the various target accounts, but that permission set should have SLIGHTLY different permissions in each account. I don’t know if this a solvable “problem” i think the cloudposse module for permissionsets is nice, but I don’t think this pattern is possible?
Wendell
Wendellover 2 years ago
Good morning kind folks! I have a question about the use of context modules in Cloudposse’s AWS DMS modules. When I try to plan anything using examples right off the readme:
module "dms_replication_instance" {
  source = "cloudposse/dms/aws//modules/dms-replication-instance"
  # Cloud Posse recommends pinning every module to a specific version
  version     = "0.2.0"

  # If `auto_minor_version_upgrade` is enabled,
  # then we should omit the patch part of the version or Terraform will try to revert the version upon detected drift
  engine_version               = "3.4"
  replication_instance_class   = "dms.t2.small"
  allocated_storage            = 50
  apply_immediately            = true
  auto_minor_version_upgrade   = true
  allow_major_version_upgrade  = false
  multi_az                     = false
  publicly_accessible          = false
  preferred_maintenance_window = "sun:10:30-sun:14:30"
  vpc_security_group_ids       = [local.convox_instances_security_group_id, local.eks_security_group_id]
  subnet_ids                   = data.terraform_remote_state.common.outputs.vpc.convox.private_subnets

  context = module.this.context

  # depends_on = [
  #   # The required DMS roles must be present before replication instances can be provisioned
  #   module.dms_iam
  # ]
}

I get `
Error: Reference to undeclared module

  on dms-migration.tf line 22, in module "dms_replication_instance":
  22:   context = module.this.context

No module call named "this" is declared in the root module.

If I remove the reference to context it will next complain about the content of replication_id because it is composed of module.this.id which seems to evaluate to null or empty string.
David Jess
David Jessover 2 years ago(edited)
Hi Team, we use the multi-az-subnets module and we have been getting argument is deprecated warnings:

│ Warning: Argument is deprecated
│
│ with module.stg.module.vpc.module.isolated_subnet.aws_eip.public,
│ on .terraform/modules/stg.vpc.isolated_subnet/public.tf line 119, in resource "aws_eip" "public":
│ 119: vpc = true
│
│ use domain attribute instead
│
│ (and 14 more similar warnings elsewhere)

It looks like this module is not maintained any more? I just wondered if any one had any recommendations of similar subnet modules? or if there was a way to work around. Thanks!
kevcube
kevcubeover 2 years ago
Hi, it looks like modules/components for AWS SQS queue exist at two locations, terraform-aws-components/modules/sqs-queue/modules/terraform-aws-sqs-queue and terraform-aws-components/modules/sqs-queue (which slightly wraps the former, adding compatibility with the account-roles component)

I'm wondering why there hasn't been a root module published at cloudposse/terraform-aws-sqs-queue to manage sqs queue resources