96255f8729898d762f1ff6498dd1eb3aef2ae454
[osm/devops.git] /
1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
17
18 ---
19 apiVersion: ec2.aws.upbound.io/v1beta1
20 kind: EIP
21 metadata:
22   name: ${cluster_resource_name}-eip
23   labels:
24     provider: aws
25     cluster: ${cluster_resource_name}
26     type: eip
27 spec:
28   forProvider:
29     region: ${cluster_location}
30     domain: vpc
31     tags:
32       key: Name
33       value: ${cluster_name}-eip
34   # Use in case you wanted to use different credentials (i.e., ProviderConfig different than default)
35   providerConfigRef:
36     name: ${providerconfig_name}
37
38 ---
39 apiVersion: ec2.aws.upbound.io/v1beta1
40 kind: InternetGateway
41 metadata:
42   name: ${cluster_resource_name}-igw
43   labels:
44     provider: aws
45     cluster: ${cluster_resource_name}
46     type: igw
47 spec:
48   forProvider:
49     region: ${cluster_location}
50     vpcIdSelector:
51       matchLabels:
52         provider: aws
53         cluster: ${cluster_resource_name}
54     tags:
55       Name: ${cluster_name}-igw
56   # Use in case you wanted to use different credentials (i.e., ProviderConfig different than default)
57   providerConfigRef:
58     name: ${providerconfig_name}
59
60 ---
61 apiVersion: ec2.aws.upbound.io/v1beta1
62 kind: NATGateway
63 metadata:
64   name: ${cluster_resource_name}-natgw
65   labels:
66     provider: aws
67     cluster: ${cluster_resource_name}
68     type: natgw
69 spec:
70   forProvider:
71     region: ${cluster_location}
72     connectivityType: public
73     allocationIdSelector:
74       matchLabels:
75         provider: aws
76         cluster: ${cluster_resource_name}
77         type: eip
78     subnetIdSelector:
79       matchLabels:
80         type: subnet
81         provider: aws
82         cluster: ${cluster_resource_name}
83         zone: ${cluster_location}a
84         access: public
85     tags:
86       Name: ${cluster_name}-natgw
87   # Use in case you wanted to use different credentials (i.e., ProviderConfig different than default)
88   providerConfigRef:
89     name: ${providerconfig_name}