This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fca07c
commit 1ec3177
Showing
10 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform.tfvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.12.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module "example" { | ||
source = "../../../managed-policy" | ||
|
||
providers = { | ||
aws = aws | ||
} | ||
create_role = false | ||
|
||
role_name = "ExampleManagedPolicyRoleStage" | ||
|
||
policy_name = "ExampleManagedPolicyAdditionalStage" | ||
policy_description = "An additional example policy bound to the testing policy for the module." | ||
policy_document_json = var.policy_document_json | ||
|
||
|
||
tags = {"Resource Owner" = "Managed Policy Example"} | ||
} | ||
|
||
provider "aws" { | ||
region = var.region | ||
|
||
default_tags { | ||
tags = { | ||
"Environment" = "stage", | ||
"Managed By" = "terraform" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
output "policy_name" { | ||
value = module.example.policy_name | ||
} | ||
|
||
output "policy_arn" { | ||
value = module.example.policy_arn | ||
} | ||
|
||
output "role_name" { | ||
value = module.example.role_name | ||
} | ||
|
||
output "role_arn" { | ||
value = module.example.role_arn | ||
} | ||
|
||
output "is_new_role" { | ||
value = module.example.is_new_role | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
variable "region" { | ||
type = string | ||
default = "ap-southeast-2" | ||
} | ||
|
||
variable "policy_document_json" { | ||
type = string | ||
description = "JSON policy document" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform.tfvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.12.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module "example" { | ||
source = "../../../managed-policy" | ||
|
||
providers = { | ||
aws = aws | ||
} | ||
create_role = true | ||
|
||
role_name = "ExampleManagedPolicyRoleStage" | ||
assume_role_policy_json = var.assume_role_policy_json | ||
|
||
policy_name = "ExampleManagedPolicyStage" | ||
policy_description = "An example policy used for testing the module." | ||
policy_document_json = var.policy_document_json | ||
|
||
|
||
tags = {"Resource Owner" = "Managed Policy Example"} | ||
} | ||
|
||
provider "aws" { | ||
region = var.region | ||
|
||
default_tags { | ||
tags = { | ||
"Environment" = "stage", | ||
"Managed By" = "terraform" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
output "policy_name" { | ||
value = module.example.policy_name | ||
} | ||
|
||
output "policy_arn" { | ||
value = module.example.policy_arn | ||
} | ||
|
||
output "role_name" { | ||
value = module.example.role_name | ||
} | ||
|
||
output "role_arn" { | ||
value = module.example.role_arn | ||
} | ||
|
||
output "is_new_role" { | ||
value = module.example.is_new_role | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
variable "region" { | ||
type = string | ||
default = "ap-southeast-2" | ||
} | ||
|
||
variable "policy_document_json" { | ||
type = string | ||
description = "JSON policy document" | ||
} | ||
|
||
variable "assume_role_policy_json" { | ||
type = string | ||
description = "Json policy document" | ||
} |