/
infrastructureConfiguration.go
266 lines (228 loc) · 12.6 KB
/
infrastructureConfiguration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package imagebuilder
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource schema for AWS::ImageBuilder::InfrastructureConfiguration
type InfrastructureConfiguration struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the infrastructure configuration.
Arn pulumi.StringOutput `pulumi:"arn"`
// The description of the infrastructure configuration.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The instance metadata option settings for the infrastructure configuration.
InstanceMetadataOptions InfrastructureConfigurationInstanceMetadataOptionsPtrOutput `pulumi:"instanceMetadataOptions"`
// The instance profile of the infrastructure configuration.
InstanceProfileName pulumi.StringOutput `pulumi:"instanceProfileName"`
// The instance types of the infrastructure configuration.
InstanceTypes pulumi.StringArrayOutput `pulumi:"instanceTypes"`
// The EC2 key pair of the infrastructure configuration..
KeyPair pulumi.StringPtrOutput `pulumi:"keyPair"`
// The logging configuration of the infrastructure configuration.
Logging InfrastructureConfigurationLoggingPtrOutput `pulumi:"logging"`
// The name of the infrastructure configuration.
Name pulumi.StringOutput `pulumi:"name"`
// The tags attached to the resource created by Image Builder.
ResourceTags pulumi.StringMapOutput `pulumi:"resourceTags"`
// The security group IDs of the infrastructure configuration.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.
SnsTopicArn pulumi.StringPtrOutput `pulumi:"snsTopicArn"`
// The subnet ID of the infrastructure configuration.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
// The tags associated with the component.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The terminate instance on failure configuration of the infrastructure configuration.
TerminateInstanceOnFailure pulumi.BoolPtrOutput `pulumi:"terminateInstanceOnFailure"`
}
// NewInfrastructureConfiguration registers a new resource with the given unique name, arguments, and options.
func NewInfrastructureConfiguration(ctx *pulumi.Context,
name string, args *InfrastructureConfigurationArgs, opts ...pulumi.ResourceOption) (*InfrastructureConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.InstanceProfileName == nil {
return nil, errors.New("invalid value for required argument 'InstanceProfileName'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"name",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource InfrastructureConfiguration
err := ctx.RegisterResource("aws-native:imagebuilder:InfrastructureConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInfrastructureConfiguration gets an existing InfrastructureConfiguration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetInfrastructureConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InfrastructureConfigurationState, opts ...pulumi.ResourceOption) (*InfrastructureConfiguration, error) {
var resource InfrastructureConfiguration
err := ctx.ReadResource("aws-native:imagebuilder:InfrastructureConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InfrastructureConfiguration resources.
type infrastructureConfigurationState struct {
}
type InfrastructureConfigurationState struct {
}
func (InfrastructureConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*infrastructureConfigurationState)(nil)).Elem()
}
type infrastructureConfigurationArgs struct {
// The description of the infrastructure configuration.
Description *string `pulumi:"description"`
// The instance metadata option settings for the infrastructure configuration.
InstanceMetadataOptions *InfrastructureConfigurationInstanceMetadataOptions `pulumi:"instanceMetadataOptions"`
// The instance profile of the infrastructure configuration.
InstanceProfileName string `pulumi:"instanceProfileName"`
// The instance types of the infrastructure configuration.
InstanceTypes []string `pulumi:"instanceTypes"`
// The EC2 key pair of the infrastructure configuration..
KeyPair *string `pulumi:"keyPair"`
// The logging configuration of the infrastructure configuration.
Logging *InfrastructureConfigurationLogging `pulumi:"logging"`
// The name of the infrastructure configuration.
Name *string `pulumi:"name"`
// The tags attached to the resource created by Image Builder.
ResourceTags map[string]string `pulumi:"resourceTags"`
// The security group IDs of the infrastructure configuration.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.
SnsTopicArn *string `pulumi:"snsTopicArn"`
// The subnet ID of the infrastructure configuration.
SubnetId *string `pulumi:"subnetId"`
// The tags associated with the component.
Tags map[string]string `pulumi:"tags"`
// The terminate instance on failure configuration of the infrastructure configuration.
TerminateInstanceOnFailure *bool `pulumi:"terminateInstanceOnFailure"`
}
// The set of arguments for constructing a InfrastructureConfiguration resource.
type InfrastructureConfigurationArgs struct {
// The description of the infrastructure configuration.
Description pulumi.StringPtrInput
// The instance metadata option settings for the infrastructure configuration.
InstanceMetadataOptions InfrastructureConfigurationInstanceMetadataOptionsPtrInput
// The instance profile of the infrastructure configuration.
InstanceProfileName pulumi.StringInput
// The instance types of the infrastructure configuration.
InstanceTypes pulumi.StringArrayInput
// The EC2 key pair of the infrastructure configuration..
KeyPair pulumi.StringPtrInput
// The logging configuration of the infrastructure configuration.
Logging InfrastructureConfigurationLoggingPtrInput
// The name of the infrastructure configuration.
Name pulumi.StringPtrInput
// The tags attached to the resource created by Image Builder.
ResourceTags pulumi.StringMapInput
// The security group IDs of the infrastructure configuration.
SecurityGroupIds pulumi.StringArrayInput
// The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.
SnsTopicArn pulumi.StringPtrInput
// The subnet ID of the infrastructure configuration.
SubnetId pulumi.StringPtrInput
// The tags associated with the component.
Tags pulumi.StringMapInput
// The terminate instance on failure configuration of the infrastructure configuration.
TerminateInstanceOnFailure pulumi.BoolPtrInput
}
func (InfrastructureConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*infrastructureConfigurationArgs)(nil)).Elem()
}
type InfrastructureConfigurationInput interface {
pulumi.Input
ToInfrastructureConfigurationOutput() InfrastructureConfigurationOutput
ToInfrastructureConfigurationOutputWithContext(ctx context.Context) InfrastructureConfigurationOutput
}
func (*InfrastructureConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**InfrastructureConfiguration)(nil)).Elem()
}
func (i *InfrastructureConfiguration) ToInfrastructureConfigurationOutput() InfrastructureConfigurationOutput {
return i.ToInfrastructureConfigurationOutputWithContext(context.Background())
}
func (i *InfrastructureConfiguration) ToInfrastructureConfigurationOutputWithContext(ctx context.Context) InfrastructureConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(InfrastructureConfigurationOutput)
}
type InfrastructureConfigurationOutput struct{ *pulumi.OutputState }
func (InfrastructureConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InfrastructureConfiguration)(nil)).Elem()
}
func (o InfrastructureConfigurationOutput) ToInfrastructureConfigurationOutput() InfrastructureConfigurationOutput {
return o
}
func (o InfrastructureConfigurationOutput) ToInfrastructureConfigurationOutputWithContext(ctx context.Context) InfrastructureConfigurationOutput {
return o
}
// The Amazon Resource Name (ARN) of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The description of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The instance metadata option settings for the infrastructure configuration.
func (o InfrastructureConfigurationOutput) InstanceMetadataOptions() InfrastructureConfigurationInstanceMetadataOptionsPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) InfrastructureConfigurationInstanceMetadataOptionsPtrOutput {
return v.InstanceMetadataOptions
}).(InfrastructureConfigurationInstanceMetadataOptionsPtrOutput)
}
// The instance profile of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) InstanceProfileName() pulumi.StringOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringOutput { return v.InstanceProfileName }).(pulumi.StringOutput)
}
// The instance types of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) InstanceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringArrayOutput { return v.InstanceTypes }).(pulumi.StringArrayOutput)
}
// The EC2 key pair of the infrastructure configuration..
func (o InfrastructureConfigurationOutput) KeyPair() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringPtrOutput { return v.KeyPair }).(pulumi.StringPtrOutput)
}
// The logging configuration of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) Logging() InfrastructureConfigurationLoggingPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) InfrastructureConfigurationLoggingPtrOutput { return v.Logging }).(InfrastructureConfigurationLoggingPtrOutput)
}
// The name of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The tags attached to the resource created by Image Builder.
func (o InfrastructureConfigurationOutput) ResourceTags() pulumi.StringMapOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringMapOutput { return v.ResourceTags }).(pulumi.StringMapOutput)
}
// The security group IDs of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// The SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) SnsTopicArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringPtrOutput { return v.SnsTopicArn }).(pulumi.StringPtrOutput)
}
// The subnet ID of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringPtrOutput { return v.SubnetId }).(pulumi.StringPtrOutput)
}
// The tags associated with the component.
func (o InfrastructureConfigurationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The terminate instance on failure configuration of the infrastructure configuration.
func (o InfrastructureConfigurationOutput) TerminateInstanceOnFailure() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *InfrastructureConfiguration) pulumi.BoolPtrOutput { return v.TerminateInstanceOnFailure }).(pulumi.BoolPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InfrastructureConfigurationInput)(nil)).Elem(), &InfrastructureConfiguration{})
pulumi.RegisterOutputType(InfrastructureConfigurationOutput{})
}