Skip to content

Commit

Permalink
Adding CloudFormation route to install Puppet
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Oct 7, 2019
1 parent 2cd0e23 commit 3ba48a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
Expand Up @@ -4,12 +4,12 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: |
Initialiser template used to bring up the install ServiceCatalog-Puppet
{"version": "0.37.0", "framework": "servicecatalog-puppet", "role": "initialiser"}
{"version": "0.37.1", "framework": "servicecatalog-puppet", "role": "initialiser"}
Parameters:
Version:
Type: String
Default: "0.37.0"
Default: "0.37.1"
Description: |
Which version of aws-service-catalog-puppet to install
EnabledRegions:
Expand All @@ -21,16 +21,19 @@ Parameters:
AllowedValues:
- True
- False
Default: False
ShouldForwardEventsToEventbridge:
Type: String
AllowedValues:
- True
- False
Default: False
ShouldForwardFailuresToOpscenter:
Type: String
AllowedValues:
- True
- False
Default: True

Resources:
Param:
Expand All @@ -43,7 +46,7 @@ Resources:
InitialiserRole:
Type: AWS::IAM::Role
Properties:
RoleName: Initialiser
RoleName: PuppetInitialiser
Path: /servicecatalog-product-puppet/
AssumeRolePolicyDocument:
Version: "2012-10-17"
Expand Down Expand Up @@ -89,19 +92,23 @@ Resources:
- Name: SHOULD_FORWARD_FAILURES_TO_OPSCENTER
Type: PLAINTEXT
Value: !Ref ShouldForwardFailuresToOpscenter

- Name: PUPPET_ACCOUNT_ID
Type: PLAINTEXT
Value: !Ref AWS::AccountId
Source:
Type: NO_SOURCE
BuildSpec: !Sub |
BuildSpec: |
version: 0.2
phases:
install:
commands:
- pip install aws-service-catalog-puppet==$${VERSION}
- servicecatalog-puppet --info set-regions $${ENABLED_REGIONS}
- servicecatalog-puppet set-config-value should_collect_cloudformation_events $${SHOULD_COLLECT_CLOUDFORMATION_EVENTS}
- servicecatalog-puppet set-config-value should_forward_events_to_eventbridge $${SHOULD_FORWARD_EVENTS_TO_EVENTBRIDGE}
- servicecatalog-puppet set-config-value should_forward_failures_to_opscenter $${SHOULD_FORWARD_FAILURES_TO_OPSCENTER}
- servicecatalog-puppet bootstrap-spoke ${AWS::AccountId}
- pip install aws-service-catalog-puppet==${VERSION}
- servicecatalog-puppet --info set-regions ${ENABLED_REGIONS}
- servicecatalog-puppet set-config-value should_collect_cloudformation_events ${SHOULD_COLLECT_CLOUDFORMATION_EVENTS}
- servicecatalog-puppet set-config-value should_forward_events_to_eventbridge ${SHOULD_FORWARD_EVENTS_TO_EVENTBRIDGE}
- servicecatalog-puppet set-config-value should_forward_failures_to_opscenter ${SHOULD_FORWARD_FAILURES_TO_OPSCENTER}
- servicecatalog-puppet bootstrap-spoke ${PUPPET_ACCOUNT_ID}
build:
commands:
- servicecatalog-puppet --info bootstrap
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -11,7 +11,7 @@

setuptools.setup(
name="aws-service-catalog-puppet",
version="0.37.0",
version="0.37.1",
author="Eamonn Faherty",
author_email="aws-service-catalog-tools@amazon.com",
description="Making it easier to deploy ServiceCatalog products",
Expand Down

0 comments on commit 3ba48a2

Please sign in to comment.