tf-modules
is a set of Terraform modules developed to help creating infrastructure for amilochau
projects.
The following modules are proposed for Infrastructure as Code, and can be freely used:
Path | Description |
---|---|
aws/auth | Deploys AWS Cognito resources for identity management |
aws/domain | Deploys AWS domain resources |
aws/emails | Deploys AWS SES resources for emails management, including domain validation |
aws/functions-app | Deploys AWS Lambda functions resources, including multi-triggers management and data storage |
aws/identity-center | Deploys AWS IAM Identity Center, to manage cross-accounts permissions via SSO |
aws/landing-zones | Deploys AWS landing zones, to architect AWS organizations and accounts |
aws/management | Deploys AWS global management resources, to help manage an AWS organization with a management account |
aws/static-web-app | Deploys AWS CloudFront to expose a Static Web App, with routing policies for APIs |
aws/tf-backend | Deploys AWS resources to manage a Terraform backend |
github/identity-provider | Registers GitHub in AWS with OIDC |
github/organization | Deploys GitHub organization resources |
github/repository | Deploys a GitHub repository |
amilochau/tf-modules
is proposed as Terraform modules. You can reference them using generic Git source:
module "functions_app" {
source = "git::https://github.com/amilochau/tf-modules.git//aws/functions-app?ref=v2"
# Settings - omitted here
}
Note that the ref=v1
indicates which reference of the current repository you want to work with. Use the strategy that fits your use case:
ref=v1.0.0
(orref=COMMIT_SHA
): you benefit for stability, but you don't get latest features, bugfixes and security fixesref=v1
: you use the latest features of the major version you indicate; you don't suffer from breaking changes, but infrastructure changes can usually be seen with new features and fixesref=main
: you always use the latest features, even if they are not released; you may encounter breaking changes and bugs - use it only for quick prototypes
These commands can help you run the Terraform modules manually, thanks to terraform
CLI:
terraform init
: initializes Terraform current moduleterraform get
: gets latest version of the moduleterraform workspace list
: lists available workspacesterraform workspace new WORKSPACE_NAME
: creates a new workspace (asdev
,prd
,shd
)terraform workspace set WORKSPACE_NAME
: sets the current workspaceterraform plan -var-file="hosts/HOST_NAME.tfvars"
: plans the deployment of a specific hostterraform apply -var-file="hosts/HOST_NAME.tfvars"
: applies the deployment of a specific host
Feel free to push your code if you agree with publishing under the MIT license.