main.tf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
terraform {
  required_version = ">= 1.15.0, < 2.0.0"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 6.0, < 7.0"
    }
  }
}

provider "aws" {
  region = "ap-south-1"
}

module "ram_share" {
  source = "../../modules/ram-share"

  name_prefix = "test-local"

  resource_shares = {
    isolated_subnets = {
      name_suffix   = "isolated-subnets"
      resource_arns = ["arn:aws:ec2:ap-south-1:197101256952:subnet/subnet-0a1ab504311dae1c3"]
      principals    = ["arn:aws:organizations::197101256952:organization/o-zjw1sjgqe1"]
    }
  }

  tags = {
    environment = "local-test"
    owner       = "patrick-ambrose"
  }
}

output "resource_share_arns" {
  value = module.ram_share.resource_share_arns
}

output "resource_associations" {
  value = module.ram_share.resource_associations
}

output "principal_associations" {
  value = module.ram_share.principal_associations
}