@@ -15,6 +15,52 @@ Actions](https://github.com/features/actions) configurations
15
15
appropriate for an Ansible role, as well as the Terraform code to
16
16
create the AWS test user.
17
17
18
+ ## Pre-requisites ##
19
+
20
+ In order to execute the Molecule tests for this Ansible role in GitHub
21
+ Actions, a build user must exist in AWS. The accompanying Terraform
22
+ code will create the user with the appropriate name and
23
+ permissions. This only needs to be run once per project, per AWS
24
+ account. This user can also be used to run the Molecule tests on your
25
+ local machine.
26
+
27
+ Before the build user can be created, the following profile must exist in
28
+ your AWS credentials file:
29
+
30
+ * ` cool-terraform-backend `
31
+
32
+ The easiest way to set up that profile is to use our
33
+ [ ` aws-profile-sync ` ] ( https://github.com/cisagov/aws-profile-sync )
34
+ utility. Follow the usage instructions in that repository before
35
+ continuing with the next steps. Note that you will need to know where
36
+ your team stores their remote profile data in order to use
37
+ [ ` aws-profile-sync ` ] ( https://github.com/cisagov/aws-profile-sync ) .
38
+
39
+ To create the build user, follow these instructions:
40
+
41
+ ``` console
42
+ cd terraform
43
+ terraform init --upgrade=true
44
+ terraform apply
45
+ ```
46
+
47
+ Once the user is created you will need to update the [ repository's
48
+ secrets] ( https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets )
49
+ with the new encrypted environment variables. This should be done
50
+ using the
51
+ [ ` terraform-to-secrets ` ] ( https://github.com/cisagov/development-guide/tree/develop/project_setup#terraform-iam-credentials-to-github-secrets- )
52
+ tool available in the [ development
53
+ guide] ( https://github.com/cisagov/development-guide ) . Instructions for
54
+ how to use this tool can be found in the [ "Terraform IAM Credentials
55
+ to GitHub Secrets"
56
+ section] ( https://github.com/cisagov/development-guide/tree/develop/project_setup#terraform-iam-credentials-to-github-secrets- ) .
57
+ of the Project Setup README.
58
+
59
+ If you have appropriate permissions for the repository you can view
60
+ existing secrets on the [ appropriate
61
+ page] ( https://github.com/cisagov/skeleton-packer/settings/secrets ) in
62
+ the repository's settings.
63
+
18
64
## Requirements ##
19
65
20
66
None.
0 commit comments