-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the cloud-governance infra: User, Policy, Bucket
- Loading branch information
Showing
8 changed files
with
250 additions
and
108 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,41 @@ | ||
## Create CloudGovernance Infra in the cloud | ||
|
||
#### Requirements | ||
|
||
- IAM User: to access cloud resources. | ||
- IAM Policy: Least privilege principle | ||
- S3-Bucket: To store the logs of cloud-governance policy runs. | ||
|
||
### Pre-requisites | ||
|
||
- Install [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli). | ||
- Configure IAM Access credentials. (Admin Privileges/ Required Permissions to create/delete an user/policy/bucket) | ||
|
||
Steps to create Cloud Governance Infra resources: | ||
|
||
- Download tar `CloudGovernanceInfra.tar` and untar the file. | ||
|
||
```shell | ||
curl -L https://github.com/redhat-performance/cloud-governance/raw/main/iam/clouds/aws/CloudGovernanceInfra.tar | tar -xzvf - | ||
``` | ||
|
||
- Create CloudGovernance Infra: User, Policy and Bucket | ||
|
||
```shell | ||
terraform init | ||
terraform apply -var=IAM_USERNAME="cloud-governance-user" -var=IAM_POLICY_NAME="CloudGovernanceReadPolicy" -var =S3_BUCKET_NAME="${ACCOUNT_NAME}-cloud-governance" | ||
``` | ||
|
||
- To provide ACCESS_KEY_ID and SECRET_KEY_ID run below commnd | ||
|
||
```shell | ||
terraform output SECRET_KEY_ID | ||
terraform output ACCESS_KEY_ID | ||
|
||
``` | ||
|
||
- Destroy CloudGovernanceInfra | ||
|
||
```shell | ||
terraform destroy -var=IAM_USERNAME="cloud-governance-user" -var=IAM_POLICY_NAME="CloudGovernanceReadPolicy" -var =S3_BUCKET_NAME="${ACCOUNT_NAME}-cloud-governance" | ||
``` |
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
Binary file added
BIN
+26.5 KB
iam/clouds/aws/CloudGovernanceInfra/terraform/CloudGovernanceInfra.tar
Binary file not shown.
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
Oops, something went wrong.