Created
November 6, 2019 21:51
-
-
Save ricardochaves/79b9f6f5cf5b9f37b872b679b093ef59 to your computer and use it in GitHub Desktop.
Recipe for Google Deployment Manager
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
def GenerateConfig(context): | |
"""Generate YAML resource configuration.""" | |
ip_name = context.properties["IP_NAME"] | |
region = context.properties["REGION"] | |
resources = [] | |
resources.append( | |
{ | |
"name": ip_name, | |
"type": "compute.beta.address", | |
"properties": { | |
"description": "dev static IP", | |
"networkTier": "PREMIUM", | |
"addressType": "EXTERNAL", | |
"region": region, | |
}, | |
} | |
) | |
outputs = [] | |
outputs.append({"name": "address", "value": "$(ref." + ip_name + ".address)"}) | |
return {"resources": resources, "outputs": outputs} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment