We are going to perform the following steps:
Here are the steps you need to follow to “Using Terraform”
Navigate to the ServiceCatalogFactory CodeCommit repository
Open the Add file menu and click the Create file button
Paste the following snippet to the main input field:
Set your filename to workspaces/networking.yaml
Set your Author name
Set your Email address
Set your Commit message
Using a good / unique commit message will help you understand what is going on later.
The YAML file we created in the CodeCommit repository told the framework to:
Once you have made your changes the ServiceCatalogFactory Pipeline should have run. If you were very quick in making the change, the pipeline may still be running. If it has not yet started feel free to the hit the Release change button.
Once it has completed it should show the Source and Build stages in green to indicate they have completed successfully:
The screenshots may differ slightly as the design of AWS CodePipeline changes. You should see a pipeline where each stage is green.
When you configured your product version, you specified the following version:
This tells the framework the source code for the product comes from the main branch of a CodeCommit repository of the name subnet-terraform.
We now need to create the CodeCommit repository and add the AWS CloudFormation template we are going to use for our workspace.
Navigate to AWS CodeCommit
Click Create repository
subnet-terraform
Set the File name to subnet.tf
Set your Author name
Set your Email address
Set your Commit message
Using a good / unique commit message will help you understand what is going on later.
The name or number of files does not matter when you are creating your own workspaces using Terraform.
Creating that file should trigger your workspace–subnet-v1-pipeline.
Once the pipeline has completed it should show the stages in green to indicate they have completed successfully:
You should see your commit message on this screen, it will help you know which version of ServiceCatalogFactory repository the pipeline is processing.
The screenshots may differ slightly as the design of AWS CodePipeline changes. You should see a pipeline where each stage is green.
You have now successfully created a stack!
Now that you have verified the pipeline has run correctly you can go to Amazon S3 to view the stack.
Navigate to https://s3.console.aws.amazon.com/s3/home
Select the bucket named sc-puppet-stacks-repository-<account_id>
Navigate to workspace/subnet/v1 where you should see an object named workspace.zip
Navigate to the ServiceCatalogPuppet CodeCommit repository again
Click on manifest.yaml
Click Edit
Append the following snippet to the end of the file in the input field:
The main input field should look like this (remember to set your account_id):
Now that we have updated the manifest file we are ready to commit it.
Using a good / unique commit message will help you understand what is going on later.
When you added the following:
You told the framework to provision v1 of subnet into the default region of each account that has the tag type:prod
Once you have made your changes the ServiceCatalogPuppet Pipeline should have run. If you were quick in making the change, the pipeline may still be running. If it has not yet started feel free to the hit the Release change button.
Once it has completed it should show the stages in green to indicate they have completed successfully:
The screenshots may differ slightly as the design of AWS CodePipeline changes. You should see a pipeline where each stage is green.
You have now successfully provisioned a workspace.