Cross-Functional Architecture And Tools For Cloud-Based Operating Models
After you have outgrown the need for the IAM resources created for the demos, you can delete the resources by using two simple CLI commands given below.
One reason to delete the IAM resources is if you want to continually refresh new credentials for security reasons.
Another reason to delete the IAM resources is if you are ready to tighten security by using lower-level permissions instead of the Super User permissions that the first-run-throughs of the demos require.
The following sections will show you how to delete both the Azure IAM resources and the AWS IAM resources.
If “acmDemoSetup.py” and “subscriptionScopeRole.json” are not shown in the results of “ls -al”, then install it again by running the following two commands:
wget https://github.com/AgileCloudInstitute/acm-demos-github/blob/main/acmDemoSetup.py?raw=true -O acmDemoSetup.py
wget https://github.com/AgileCloudInstitute/acm-demos-github/blob/main/subscriptionScopeRole.json?raw=true -O subscriptionScopeRole.json
Get the “clientId” value from the config.yaml you created for the demos, then run the following command after replacing “valid-client-id-created-fordemo” with the actual valid value of the clientId.
python acmDemoSetup.py destroy azure clientId=valid-client-id-created-fordemo
The following screen shot illustrates what a Bash Cloud Shell should look like after successfully running the “python acmDemoSetup.py destroy azure clientId=valid-client-id-created-fordemo” command, including all of the printed message lines indicating success:
If “acmDemoSetup.py” is not shown in the results of “ls -al”, then install it again by running the following command:
wget https://github.com/AgileCloudInstitute/acm-demos-github/blob/main/acmDemoSetup.py?raw=true -O acmDemoSetup.py
Get the value for the “AWSAccessKeyId” from the keys.yaml that you created for the demos and paste it into the following command instead of “ValidAWSAccessKeyIdThatWasCreatedByCreateCommand”, and run the following command with the correct value for “AWSAccessKeyId”:
python3 acmDemoSetup.py destroy aws userName=ACMUser_xyz groupName=SuperUserACM_xyz keyPairName=ACMKeyPair_xyz AWSAccessKeyId=ValidAWSAccessKeyIdThatWasCreatedByCreateCommand
The following screen shot shows what the cloud shell should look like after the “python3 acmDemoSetup.py destroy aws userName=ACMUser_xyz groupName=SuperUserACM_xyz keyPairName=ACMKeyPair_xyz AWSAccessKeyId=ValidAWSAccessKeyIdThatWasCreatedByCreateCommand” command has been run, including all the success messages indicating that the command succeeded.
When you are ready to run the demos again after destroying the IAM resources, you can create replacement IAM resources quickly in each cloud by following the Assemble keys.yaml and config.yaml instructions again.