Skip to content

Commit

Permalink
output demo
Browse files Browse the repository at this point in the history
  • Loading branch information
qtsathish committed Apr 16, 2021
1 parent a675df6 commit 597f373
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
42 changes: 42 additions & 0 deletions April21/deploymentmanager/outputdemo/main.yaml
@@ -0,0 +1,42 @@
---
imports:
- path: network-template.jinja
resources:
- name: openhttp
type: compute.v1.firewall
properties:
name: openhttp
network: $(ref.network-from-template.selfLink)
sourceRanges:
- "0.0.0.0/0"
allowed:
- IPProtocol: tcp
ports:
- "80"
- "443"
- name: openssh
type: compute.v1.firewall
properties:
name: openssh
network: $(ref.network-from-template.selfLink)
sourceRanges:
- "0.0.0.0/0"
allowed:
- IPProtocol: tcp
ports:
- "22"
- name: network-from-template
type: network-template.jinja
properties: {}

outputs:
- name: openhttp-firewallurl
value: $(ref.openhttp.selfLink)
- name: openssh-firewallurl
value: $(ref.openssh.selfLink)
- name: network-url
value: $(ref.network-from-template.selfLink)
- name: subnets
value: $(ref.network-from-template.subnetworks)


14 changes: 14 additions & 0 deletions April21/deploymentmanager/outputdemo/network-template.jinja
@@ -0,0 +1,14 @@
---
resources:
- name: new-network
type: compute.v1.network
properties:
routingConfig:
routingMode: REGIONAL
autoCreateSubnetworks: yes

outputs:
- name: selfLink
value: $(ref.new-network.selfLink)
- name: subnetworks
value: $(ref.new-network.subnetworks)

0 comments on commit 597f373

Please sign in to comment.