Skip to content

Commit

Permalink
add common-apps-remote-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jul 27, 2023
1 parent 56339ec commit 3fbdc47
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/common-apps-remote-roles/.tf-control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .tf-control
# allows for setting a specific command to be used for tf-* commands under this git repo
# see tf-control.sh help for more info

TFCONTROL_VERSION="1.0.5"

TFCOMMAND="terraform_latest"
# TF_CLI_CONFIG_FILE=PATH-TO-FILE/.tf-control.tfrc
# TFARGS=""
# TFNOLOG=""
# TFNOCOLOR=""

# use the following to force a specific version. An upgrade of an existing 0.12.31 to 1.x
# needs you to cycle through 0.13.17, 0.14.11, and then latest (0.15.5 not needed). Other
# steps in between. See https://github.e.it.census.gov/terraform/support/tree/master/docs/how-to/terraform-upgrade for details
#
#TFCOMMAND="terraform_0.12.31"
#TFCOMMAND="terraform_0.13.7"
#TFCOMMAND="terraform_0.14.11"
#TFCOMMAND="terraform_0.15.5"
24 changes: 24 additions & 0 deletions examples/common-apps-remote-roles/.tf-control.tfrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
TFCONTROL_VERSION="1.0.5"

# https://www.terraform.io/docs/cli/config/config-file.html
plugin_cache_dir = "/data/terraform/terraform.d/plugin-cache"
#disable_checkpoint = true

provider_installation {
# filesystem_mirror {
# path = "/apps/terraform/terraform.d/providers"
# include = [ "*/*/*" ]
# }
filesystem_mirror {
path = "/data/terraform/terraform.d/providers"
include = [ "*/*/*" ]
}
# filesystem_mirror {
# path = "/apps/terraform/terraform.d/providers"
# include = [ "external.terraform.census.gov/*/*" ]
# }
direct {
include = [ "*/*/*" ]
}
}

19 changes: 19 additions & 0 deletions examples/common-apps-remote-roles/INF.remote-roles.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

module "tf_role" {
source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//route53-zone-association/terraform-role?ref=tf-upgrade"

tags = merge(
local.common_tags,
var.application_tags,
)
}


module "dynr53_role" {
source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//route53-zone-association/lambda-role?ref=tf-upgrade"

tags = merge(
local.common_tags,
var.application_tags,
)
}
5 changes: 5 additions & 0 deletions examples/common-apps-remote-roles/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
locals {
base_tags = {
"boc:created_by" = "terraform"
}
}
3 changes: 3 additions & 0 deletions examples/common-apps-remote-roles/region.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
region = var.region
}
19 changes: 19 additions & 0 deletions examples/common-apps-remote-roles/tf-run.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VERSION 2.0.1
REMOTE-STATE
COMMAND tf-directory-setup.py -l none -f
COMMAND setup-new-directory.sh
LINKTOP includes.d/variables.account_tags.tf
LINKTOP includes.d/variables.account_tags.auto.tfvars
LINKTOP includes.d/variables.infrastructure_tags.tf
LINKTOP includes.d/variables.infrastructure_tags.auto.tfvars
LINKTOP includes.d/variables.application_tags.tf
LINKTOP includes.d/variables.application_tags.auto.tfvars
# LINKTOP provider_configs.d/provider.ldap_new.auto.tfvars
# LINKTOP provider_configs.d/provider.ldap_new.tf
# LINKTOP provider_configs.d/provider.ldap_new.variables.tf
COMMAND rm provider.ldap.*
COMMAND tf-init -upgrade

#POLICY
ALL
COMMAND tf-directory-setup.py -l s3
33 changes: 33 additions & 0 deletions examples/common-apps-remote-roles/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
terraform {
required_version = ">= 1.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.0"
}
ldap = {
source = "trevex/ldap"
version = ">= 0.5.4"
}
# external = {
# source = "hashicorp/external"
# version = ">= 1.0"
# }
# null = {
# source = "hashicorp/null"
# version = ">= 1.0"
# }
# random = {
# source = "hashicorp/random"
# version = ">= 1.0"
# }
# template = {
# source = "hashicorp/template"
# version = ">= 1.0"
# }
# infoblox = {
# source = "infobloxopen/infoblox"
# version = ">= 2.1.0"
# }
}
}

0 comments on commit 3fbdc47

Please sign in to comment.