Skip to content

nsbno/terraform-aws-account-metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Account Metadata

A data module that gives you typical values that are needed in your environment.

Usage

To use this module, just add it to your terraform!

module "metadata" {
  source = "github.com/nsbno/terraform-aws-account-metadata?ref=x.y.z"
}

That’s it 😄

Remember to check out the outputs to see all metadata.

You can use the output of this module like this:

module "ecs_task" {
  source = "..."

  vpc_id                   = module.metadata.network.vpc_id
  private_subnet_ids       = module.metadata.network.private_subnet_ids

  # [...]

  lb_listeners = [{
    listener_arn      = module.metadata.load_balancer.https_listener_arn
    security_group_id = module.metadata.load_balancer.security_group_id

    conditions = [{
      path_pattern = "/${local.application_name}/*"
    }]
  }]
}

Or if you have an API Gateway:

module "api_gateway" {
  source = "..."

  domain_name = module.metadata.dns.domain_name
}

Examples

Simple Example

In reality just the example you can see on the top of this README.

Example with Options

Here you can see how to turn off individual parts of the metadata. Usefull when the account doesn’t have the resources.

About

Get metadata about your AWS account and common resources

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages