diff --git a/examples/simple-setup/main.tf b/examples/simple-setup/main.tf new file mode 100644 index 0000000..d0bf56f --- /dev/null +++ b/examples/simple-setup/main.tf @@ -0,0 +1,7 @@ +module "github_actions_iam_role" { + source = "github.com/infraspecdev/terraform-aws-github-actions-iam-role?ref=main" + aws_account_id = var.aws_account_id + github_username = var.github_username + repository_names = var.repository_names + role_name = var.role_name +} diff --git a/examples/simple-setup/terraform.tfvars.example b/examples/simple-setup/terraform.tfvars.example new file mode 100644 index 0000000..a9b9703 --- /dev/null +++ b/examples/simple-setup/terraform.tfvars.example @@ -0,0 +1,3 @@ +aws_account_id = "ACCOUNT_ID" +github_username = "GITHUB_USERNAME" +repository_names = "["REPO_NAME_1","REPO_NAME_1"]" diff --git a/examples/simple-setup/variables.tf b/examples/simple-setup/variables.tf new file mode 100644 index 0000000..83eefc2 --- /dev/null +++ b/examples/simple-setup/variables.tf @@ -0,0 +1,20 @@ +variable "aws_account_id" { + description = "The AWS Account ID" + type = string +} + +variable "github_username" { + description = "GitHub Username" + type = string +} + +variable "repository_names" { + description = "List of names of the GitHub repository that will be allowed to assume the role." + type = list(string) +} + +variable "role_name" { + description = "Name of the IAM Role" + type = string + default = "GitHubActionsRole" +}