Skip to content

Commit 1d9cbc4

Browse files
Create a module of the iam role to be assumed by github action to provision infrastructure
1 parent 5c4378b commit 1d9cbc4

File tree

21 files changed

+126
-145
lines changed

21 files changed

+126
-145
lines changed

examples/complete/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module "github_actions_iam_role" {
2+
source = "github.com/infraspecdev/terraform-aws-github-actions-iam-role?ref=main"
3+
aws_account_id = var.aws_account_id
4+
github_username = var.github_username
5+
repository_names = var.repository_names
6+
role_name = var.role_name
7+
}

examples/complete/outputs.tf

Whitespace-only changes.

examples/complete/provider.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
provider "aws" {
2+
region = "ap-south-1"
3+
default_tags {
4+
tags = {
5+
ManagedBy = "Terraform"
6+
}
7+
}
8+
}

examples/complete/variables.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
variable "aws_account_id" {
2+
description = "The AWS Account ID"
3+
type = string
4+
}
5+
6+
variable "github_username" {
7+
description = "GitHub Username"
8+
type = string
9+
}
10+
11+
variable "repository_names" {
12+
description = "List of names of the GitHub repository that will be allowed to assume the role."
13+
type = list(string)
14+
}
15+
16+
variable "role_name" {
17+
description = "Name of the IAM Role"
18+
type = string
19+
default = "GitHubActionsRole"
20+
}

examples/complete/versions.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
terraform {
2+
required_providers {
3+
aws = {
4+
source = "hashicorp/aws"
5+
version = ">= 5.51.0"
6+
}
7+
}
8+
29
required_version = ">= 1.8.4"
310
}

examples/minimal/README.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

examples/minimal/main.tf

Whitespace-only changes.

examples/minimal/outputs.tf

Whitespace-only changes.

examples/minimal/provider.tf

Whitespace-only changes.

examples/minimal/variables.tf

Whitespace-only changes.

0 commit comments

Comments
 (0)