Sign inSign up

mopdigital/code-linter

By mopdigital

•Updated over 3 years ago

Image
0

9.3K

mopdigital/code-linter repository overview

⁠MOP GLOBAL AWS INFRASTRUCTURE (ANT)

This repo provides IaC provisioned by Terraform to spawn the global MOP AWS infrastructure. The following environments are currently built:

  • Master: AWS accounts, Organization setup and Policies
  • Network: Client VPN, Core (Egress) VPC, Site-to-Site VPN, Central Transit Gateway
  • Data Engineering: Environment VPCs (Dev, QA, Prod) that are connected to the central TGW
  • Shared: S3 buckets that are used for Terraform state management

⁠Deployment

If you want to apply / deploy your environment, do a git commit in order to trigger the bitbucket pipeline under https://bitbucket.org/mopdigital/mop_ant/addon/pipelines/⁠. Then manually execute / run the "Deploy Terraform" step.

Using the different role arns for the provider aliases, the modules will be spawned into the corresponding accounts starting from the shared account and then role-switching into the sub-accounts like shared and network over STS assume role.

⁠Local Setup

Install the latest version of Terraform from here⁠, and you should be good to go.

⁠AWS Setup

Role switching needs to be implemented from shared services account into the different sub-accounts like network to spawn resources there.

Also Terraform needs the S3 bucket and DynamoDB table setup before it can do its actual work. Those steps can be automated by manually executing the admin environment inside the bitbucket pipeline:

cd /environments/admin
terraform init
terraform plan
terraform apply

⁠Useful commands

terraform  
    apply              Builds or changes infrastructure
    console            Interactive console for Terraform interpolations
    destroy            Destroy Terraform-managed infrastructure
    env                Workspace management
    fmt                Rewrites config files to canonical format
    get                Download and install modules for the configuration
    graph              Create a visual graph of Terraform resources
    import             Import existing infrastructure into Terraform
    init               Initialize a Terraform working directory
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    refresh            Update local state file against real resources
    show               Inspect Terraform state or plan
    taint              Manually mark a resource for recreation
    untaint            Manually unmark a resource as tainted
    validate           Validates the Terraform files
    version            Prints the Terraform version
    workspace          Workspace management

Tag summary

Content type

Image

Digest

sha256:d6a443245…

Size

399.3 MB

Last updated

over 3 years ago

docker pull mopdigital/code-linter