A Terraform Module for Managing AWS Access Objects
Go to file
github-actions[bot] 3f7c49c72a
chore(main): release 1.0.1 (#29)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 12:35:00 -06:00
.github fix: bump actions/cache from 3 to 4 (#25) 2024-01-31 12:17:27 -06:00
examples feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
modules fix: remove unnecessary lifecycle ignore (#21) 2023-12-19 10:36:56 -06:00
tests feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
updatecli feat: generate new security group rules and add automatic updates 2023-10-30 15:18:12 -05:00
.aliases fix: Fix ip discover (#19) 2023-12-12 12:48:14 -06:00
.envrc fix: remove unnecessary lifecycle ignore (#21) 2023-12-19 10:36:56 -06:00
.functions initial 2023-07-10 10:45:06 -05:00
.gitignore initial 2023-07-10 10:45:06 -05:00
.rcs fix: remove unnecessary lifecycle ignore (#21) 2023-12-19 10:36:56 -06:00
.variables initial 2023-07-10 10:45:06 -05:00
CHANGELOG.md chore(main): release 1.0.1 (#29) 2024-01-31 12:35:00 -06:00
README.md fix: Add release (#14) 2023-11-29 17:39:15 -06:00
flake.lock fix: Fix ip discover (#19) 2023-12-12 12:48:14 -06:00
flake.nix fix: Fix ip discover (#19) 2023-12-12 12:48:14 -06:00
main.tf feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
outputs.tf feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
terraform.md feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
variables.tf feature!: add the ability to explicitly skip parts of the module (#26) 2024-01-23 14:26:05 -06:00
versions.tf add http version constraint 2023-08-25 16:00:06 -05:00

README.md

Terraform AWS Access

AWS Access

The first step to using the AWS modules is having an AWS account, here is a document describing this process. You will need an API access key id and API secret key, you can get the API keys following this tutorial. The Terraform AWS provider uses the AWS Go SDK, which allows the use of either environment variables or config files for authentication. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-settings You do not need the AWS cli to generate the files, just place them in the proper place and Terraform will find and read them. We use environment variables to configure the AWS provider and load them by sourcing an RC file.

export AWS_ACCESS_KEY_ID='ABC123'
export AWS_SECRET_ACCESS_KEY='abc123'
export AWS_REGION='us-west-1'

These help the tests set you as the owner on the testing infra and generate the proper key. The .envrc file sources .rcs file which assumes a local file at path ~/.config/aws/default/rc exists with the above information.

Examples

Local State

The specific use case for the example modules is temporary infrastructure for testing purposes. With that in mind, it is not expected that we manage the resources as a team, therefore the state files are all stored locally. If you would like to store the state files remotely, add a terraform backend file (*.name.tfbackend) to your implementation module. https://www.terraform.io/language/settings/backends/configuration#file

Development and Testing

Paradigms and Expectations

Please make sure to read terraform.md to understand the paradigms and expectations that this module has for development.

Environment

It is important to us that all collaborators have the ability to develop in similar environments, so we use tools which enable this as much as possible. These tools are not necessary, but they can make it much simpler to collaborate.

  • I use nix that I have installed using their recommended script
  • I use direnv that I have installed using brew.
  • I simply use direnv allow to enter the environment
  • I navigate to the tests directory and run go test -v -timeout=5m -parallel=10
  • To run an individual test I nvaigate to the tests directory and run go test -v -timeout=5m -run <test function name>
    • eg. go test -v -timeout=5m -run TestBasic

Our continuous integration tests in the GitHub ubuntu-latest runner, which has many different things installed, we use nix to add dependencies.

Override Tests

You may want to test this code with slightly different parameters for your environment. Check out Terraform override files as a clean way to modify the inputs without accidentally committing any personalized code.