-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal implementations of `subscription`, `hostingplatform` and `dnszone` components. While commented out, there is also the start of support for dns entry creation for the CDN component for testing of additional resource groups on components. Minimal support for associated resource types/services has also been added.
- Loading branch information
Showing
11 changed files
with
260 additions
and
2 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
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
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,18 @@ | ||
[#ftl] | ||
|
||
[@addResourceGroupInformation | ||
type=DNS_ZONE_COMPONENT_TYPE | ||
attributes=[] | ||
provider=AWS_PROVIDER | ||
resourceGroup=DEFAULT_RESOURCE_GROUP | ||
services=[ | ||
AWS_ROUTE53_SERVICE | ||
] | ||
locations={ | ||
DEFAULT_RESOURCE_GROUP : { | ||
"TargetComponentTypes" : [ | ||
SUBSCRIPTION_COMPONENT_TYPE | ||
] | ||
} | ||
} | ||
/] |
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,40 @@ | ||
[#ftl] | ||
|
||
[#macro aws_dnszone_cf_state occurrence parent={} ] | ||
[#local core = getOccurrenceCore(occurrence) ] | ||
[#local solution = getOccurrenceSolution(occurrence) ] | ||
[#local locations = getOccurrenceLocations(occurrence) ] | ||
|
||
[#-- Combine any placement attributes with explicitly provided values --] | ||
[#local attributes = | ||
{ | ||
"REGION" : "us-east-1" | ||
} + | ||
((locations[DEFAULT_RESOURCE_GROUP].Attributes)!{}) + | ||
attributeIfContent( | ||
"ZONE", | ||
solution["external:ProviderId"]!"" | ||
) | ||
] | ||
|
||
[#assign componentState = | ||
{ | ||
"Resources" : { | ||
"external" : { | ||
"Id" : formatResourceId(AWS_ROUTE53_DNS_ZONE_RESOURCE_TYPE, core.Id), | ||
"Type" : AWS_ROUTE53_DNS_ZONE_RESOURCE_TYPE, | ||
"Deployed" : | ||
attributes["PROVIDER"]?has_content && | ||
attributes["ACCOUNT"]?has_content && | ||
attributes["ZONE"]?has_content | ||
} | ||
}, | ||
"Attributes" : attributes, | ||
"Roles" : { | ||
"Inbound" : {}, | ||
"Outbound" : {} | ||
} | ||
} | ||
] | ||
|
||
[/#macro] |
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,16 @@ | ||
[#ftl] | ||
|
||
[@addResourceGroupInformation | ||
type=HOSTING_PLATFORM_COMPONENT_TYPE | ||
attributes=[] | ||
provider=AWS_PROVIDER | ||
resourceGroup=DEFAULT_RESOURCE_GROUP | ||
services=[] | ||
locations={ | ||
DEFAULT_RESOURCE_GROUP : { | ||
"TargetComponentTypes" : [ | ||
SUBSCRIPTION_COMPONENT_TYPE | ||
] | ||
} | ||
} | ||
/] |
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,36 @@ | ||
[#ftl] | ||
|
||
[#macro aws_hostingplatform_cf_state occurrence parent={} ] | ||
[#local core = getOccurrenceCore(occurrence) ] | ||
[#local solution = getOccurrenceSolution(occurrence) ] | ||
[#local locations = getOccurrenceLocations(occurrence) ] | ||
|
||
[#-- Combine any placement attributes with explicitly provided values --] | ||
[#local attributes = | ||
((locations[DEFAULT_RESOURCE_GROUP].Attributes)!{}) + | ||
attributeIfContent( | ||
"REGION", | ||
(solution["Engine:region"].Region)!"" | ||
) | ||
] | ||
|
||
[#assign componentState = | ||
{ | ||
"Resources" : { | ||
"external" : { | ||
"Id" : formatResourceId("external", core.Id), | ||
"Type" : "external", | ||
"Deployed" : | ||
attributes["PROVIDER"]?has_content && | ||
attributes["ACCOUNT"]?has_content && | ||
attributes["REGION"]?has_content | ||
} | ||
}, | ||
"Attributes" : attributes, | ||
"Roles" : { | ||
"Inbound" : {}, | ||
"Outbound" : {} | ||
} | ||
} | ||
] | ||
[/#macro] |
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,20 @@ | ||
[#ftl] | ||
|
||
[@addResourceGroupInformation | ||
type=SUBSCRIPTION_COMPONENT_TYPE | ||
attributes=[] | ||
provider=AWS_PROVIDER | ||
resourceGroup=DEFAULT_RESOURCE_GROUP | ||
services=[ | ||
AWS_ORGANIZATIONS_SERVICE | ||
] | ||
locations={ | ||
[#-- A link to a subscription is required if not importing the provider --] | ||
DEFAULT_RESOURCE_GROUP : { | ||
"Mandatory" : false, | ||
"TargetComponentTypes" : [ | ||
SUBSCRIPTION_COMPONENT_TYPE | ||
] | ||
} | ||
} | ||
/] |
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,42 @@ | ||
[#ftl] | ||
|
||
[#macro aws_subscription_cf_state occurrence parent={} ] | ||
[#local core = getOccurrenceCore(occurrence) ] | ||
[#local solution = getOccurrenceSolution(occurrence) ] | ||
[#local locations = getOccurrenceLocations(occurrence) ] | ||
|
||
[#-- Combine any placement attributes with explicitly provided values --] | ||
[#local attributes = | ||
((locations[DEFAULT_RESOURCE_GROUP].Attributes)!{}) + | ||
attributeIfContent( | ||
"PROVIDER", | ||
solution["external:Provider"]!"" | ||
) + | ||
attributeIfContent( | ||
"ACCOUNT", | ||
solution["external:ProviderId"]!"" | ||
) + | ||
attributeIfContent( | ||
"DEPLOYMENT_FRAMEWORK", | ||
solution["external:DeploymentFramework"]!"" | ||
) | ||
] | ||
|
||
[#assign componentState = | ||
{ | ||
"Resources" : { | ||
"external" : { | ||
"Id" : formatResourceId(AWS_ORGANIZATIONS_ACCOUNT_RESOURCE_TYPE, core.Id), | ||
"Type" : AWS_ORGANIZATIONS_ACCOUNT_RESOURCE_TYPE, | ||
"Deployed" : attributes["PROVIDER"]?has_content | ||
} | ||
}, | ||
"Attributes" : attributes, | ||
"Roles" : { | ||
"Inbound" : {}, | ||
"Outbound" : {} | ||
} | ||
} | ||
] | ||
|
||
[/#macro] |
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 @@ | ||
[#ftl] | ||
|
||
[#-- Resources --] | ||
|
||
[#assign AWS_ORGANIZATIONS_ACCOUNT_RESOURCE_TYPE = "account" ] | ||
[@addServiceResource | ||
provider=AWS_PROVIDER | ||
service=AWS_ORGANIZATIONS_SERVICE | ||
resource=AWS_ORGANIZATIONS_ACCOUNT_RESOURCE_TYPE | ||
/] |
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
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