github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticbeanstalk/configurationTemplate.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package elasticbeanstalk 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an Elastic Beanstalk Configuration Template, which are associated with 16 // a specific application and are used to deploy different versions of the 17 // application with the same configuration settings. 18 // 19 // ## Example Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // tftest, err := elasticbeanstalk.NewApplication(ctx, "tftest", &elasticbeanstalk.ApplicationArgs{ 35 // Name: pulumi.String("tf-test-name"), 36 // Description: pulumi.String("tf-test-desc"), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // _, err = elasticbeanstalk.NewConfigurationTemplate(ctx, "my_template", &elasticbeanstalk.ConfigurationTemplateArgs{ 42 // Name: pulumi.String("tf-test-template-config"), 43 // Application: tftest.Name, 44 // SolutionStackName: pulumi.String("64bit Amazon Linux 2015.09 v2.0.8 running Go 1.4"), 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ## Option Settings 57 // 58 // The `setting` field supports the following format: 59 // 60 // * `namespace` - unique namespace identifying the option's associated AWS resource 61 // * `name` - name of the configuration option 62 // * `value` - value for the configuration option 63 // * `resource` - (Optional) resource name for [scheduled action](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalingscheduledaction) 64 type ConfigurationTemplate struct { 65 pulumi.CustomResourceState 66 67 // name of the application to associate with this configuration template 68 Application pulumi.StringOutput `pulumi:"application"` 69 // Short description of the Template 70 Description pulumi.StringPtrOutput `pulumi:"description"` 71 // The ID of the environment used with this configuration template 72 EnvironmentId pulumi.StringPtrOutput `pulumi:"environmentId"` 73 // A unique name for this Template. 74 Name pulumi.StringOutput `pulumi:"name"` 75 // Option settings to configure the new Environment. These 76 // override specific values that are set as defaults. The format is detailed 77 // below in Option Settings 78 Settings ConfigurationTemplateSettingArrayOutput `pulumi:"settings"` 79 // A solution stack to base your Template 80 // off of. Example stacks can be found in the [Amazon API documentation][1] 81 SolutionStackName pulumi.StringPtrOutput `pulumi:"solutionStackName"` 82 } 83 84 // NewConfigurationTemplate registers a new resource with the given unique name, arguments, and options. 85 func NewConfigurationTemplate(ctx *pulumi.Context, 86 name string, args *ConfigurationTemplateArgs, opts ...pulumi.ResourceOption) (*ConfigurationTemplate, error) { 87 if args == nil { 88 return nil, errors.New("missing one or more required arguments") 89 } 90 91 if args.Application == nil { 92 return nil, errors.New("invalid value for required argument 'Application'") 93 } 94 opts = internal.PkgResourceDefaultOpts(opts) 95 var resource ConfigurationTemplate 96 err := ctx.RegisterResource("aws:elasticbeanstalk/configurationTemplate:ConfigurationTemplate", name, args, &resource, opts...) 97 if err != nil { 98 return nil, err 99 } 100 return &resource, nil 101 } 102 103 // GetConfigurationTemplate gets an existing ConfigurationTemplate resource's state with the given name, ID, and optional 104 // state properties that are used to uniquely qualify the lookup (nil if not required). 105 func GetConfigurationTemplate(ctx *pulumi.Context, 106 name string, id pulumi.IDInput, state *ConfigurationTemplateState, opts ...pulumi.ResourceOption) (*ConfigurationTemplate, error) { 107 var resource ConfigurationTemplate 108 err := ctx.ReadResource("aws:elasticbeanstalk/configurationTemplate:ConfigurationTemplate", name, id, state, &resource, opts...) 109 if err != nil { 110 return nil, err 111 } 112 return &resource, nil 113 } 114 115 // Input properties used for looking up and filtering ConfigurationTemplate resources. 116 type configurationTemplateState struct { 117 // name of the application to associate with this configuration template 118 Application *string `pulumi:"application"` 119 // Short description of the Template 120 Description *string `pulumi:"description"` 121 // The ID of the environment used with this configuration template 122 EnvironmentId *string `pulumi:"environmentId"` 123 // A unique name for this Template. 124 Name *string `pulumi:"name"` 125 // Option settings to configure the new Environment. These 126 // override specific values that are set as defaults. The format is detailed 127 // below in Option Settings 128 Settings []ConfigurationTemplateSetting `pulumi:"settings"` 129 // A solution stack to base your Template 130 // off of. Example stacks can be found in the [Amazon API documentation][1] 131 SolutionStackName *string `pulumi:"solutionStackName"` 132 } 133 134 type ConfigurationTemplateState struct { 135 // name of the application to associate with this configuration template 136 Application pulumi.StringPtrInput 137 // Short description of the Template 138 Description pulumi.StringPtrInput 139 // The ID of the environment used with this configuration template 140 EnvironmentId pulumi.StringPtrInput 141 // A unique name for this Template. 142 Name pulumi.StringPtrInput 143 // Option settings to configure the new Environment. These 144 // override specific values that are set as defaults. The format is detailed 145 // below in Option Settings 146 Settings ConfigurationTemplateSettingArrayInput 147 // A solution stack to base your Template 148 // off of. Example stacks can be found in the [Amazon API documentation][1] 149 SolutionStackName pulumi.StringPtrInput 150 } 151 152 func (ConfigurationTemplateState) ElementType() reflect.Type { 153 return reflect.TypeOf((*configurationTemplateState)(nil)).Elem() 154 } 155 156 type configurationTemplateArgs struct { 157 // name of the application to associate with this configuration template 158 Application string `pulumi:"application"` 159 // Short description of the Template 160 Description *string `pulumi:"description"` 161 // The ID of the environment used with this configuration template 162 EnvironmentId *string `pulumi:"environmentId"` 163 // A unique name for this Template. 164 Name *string `pulumi:"name"` 165 // Option settings to configure the new Environment. These 166 // override specific values that are set as defaults. The format is detailed 167 // below in Option Settings 168 Settings []ConfigurationTemplateSetting `pulumi:"settings"` 169 // A solution stack to base your Template 170 // off of. Example stacks can be found in the [Amazon API documentation][1] 171 SolutionStackName *string `pulumi:"solutionStackName"` 172 } 173 174 // The set of arguments for constructing a ConfigurationTemplate resource. 175 type ConfigurationTemplateArgs struct { 176 // name of the application to associate with this configuration template 177 Application pulumi.StringInput 178 // Short description of the Template 179 Description pulumi.StringPtrInput 180 // The ID of the environment used with this configuration template 181 EnvironmentId pulumi.StringPtrInput 182 // A unique name for this Template. 183 Name pulumi.StringPtrInput 184 // Option settings to configure the new Environment. These 185 // override specific values that are set as defaults. The format is detailed 186 // below in Option Settings 187 Settings ConfigurationTemplateSettingArrayInput 188 // A solution stack to base your Template 189 // off of. Example stacks can be found in the [Amazon API documentation][1] 190 SolutionStackName pulumi.StringPtrInput 191 } 192 193 func (ConfigurationTemplateArgs) ElementType() reflect.Type { 194 return reflect.TypeOf((*configurationTemplateArgs)(nil)).Elem() 195 } 196 197 type ConfigurationTemplateInput interface { 198 pulumi.Input 199 200 ToConfigurationTemplateOutput() ConfigurationTemplateOutput 201 ToConfigurationTemplateOutputWithContext(ctx context.Context) ConfigurationTemplateOutput 202 } 203 204 func (*ConfigurationTemplate) ElementType() reflect.Type { 205 return reflect.TypeOf((**ConfigurationTemplate)(nil)).Elem() 206 } 207 208 func (i *ConfigurationTemplate) ToConfigurationTemplateOutput() ConfigurationTemplateOutput { 209 return i.ToConfigurationTemplateOutputWithContext(context.Background()) 210 } 211 212 func (i *ConfigurationTemplate) ToConfigurationTemplateOutputWithContext(ctx context.Context) ConfigurationTemplateOutput { 213 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationTemplateOutput) 214 } 215 216 // ConfigurationTemplateArrayInput is an input type that accepts ConfigurationTemplateArray and ConfigurationTemplateArrayOutput values. 217 // You can construct a concrete instance of `ConfigurationTemplateArrayInput` via: 218 // 219 // ConfigurationTemplateArray{ ConfigurationTemplateArgs{...} } 220 type ConfigurationTemplateArrayInput interface { 221 pulumi.Input 222 223 ToConfigurationTemplateArrayOutput() ConfigurationTemplateArrayOutput 224 ToConfigurationTemplateArrayOutputWithContext(context.Context) ConfigurationTemplateArrayOutput 225 } 226 227 type ConfigurationTemplateArray []ConfigurationTemplateInput 228 229 func (ConfigurationTemplateArray) ElementType() reflect.Type { 230 return reflect.TypeOf((*[]*ConfigurationTemplate)(nil)).Elem() 231 } 232 233 func (i ConfigurationTemplateArray) ToConfigurationTemplateArrayOutput() ConfigurationTemplateArrayOutput { 234 return i.ToConfigurationTemplateArrayOutputWithContext(context.Background()) 235 } 236 237 func (i ConfigurationTemplateArray) ToConfigurationTemplateArrayOutputWithContext(ctx context.Context) ConfigurationTemplateArrayOutput { 238 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationTemplateArrayOutput) 239 } 240 241 // ConfigurationTemplateMapInput is an input type that accepts ConfigurationTemplateMap and ConfigurationTemplateMapOutput values. 242 // You can construct a concrete instance of `ConfigurationTemplateMapInput` via: 243 // 244 // ConfigurationTemplateMap{ "key": ConfigurationTemplateArgs{...} } 245 type ConfigurationTemplateMapInput interface { 246 pulumi.Input 247 248 ToConfigurationTemplateMapOutput() ConfigurationTemplateMapOutput 249 ToConfigurationTemplateMapOutputWithContext(context.Context) ConfigurationTemplateMapOutput 250 } 251 252 type ConfigurationTemplateMap map[string]ConfigurationTemplateInput 253 254 func (ConfigurationTemplateMap) ElementType() reflect.Type { 255 return reflect.TypeOf((*map[string]*ConfigurationTemplate)(nil)).Elem() 256 } 257 258 func (i ConfigurationTemplateMap) ToConfigurationTemplateMapOutput() ConfigurationTemplateMapOutput { 259 return i.ToConfigurationTemplateMapOutputWithContext(context.Background()) 260 } 261 262 func (i ConfigurationTemplateMap) ToConfigurationTemplateMapOutputWithContext(ctx context.Context) ConfigurationTemplateMapOutput { 263 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationTemplateMapOutput) 264 } 265 266 type ConfigurationTemplateOutput struct{ *pulumi.OutputState } 267 268 func (ConfigurationTemplateOutput) ElementType() reflect.Type { 269 return reflect.TypeOf((**ConfigurationTemplate)(nil)).Elem() 270 } 271 272 func (o ConfigurationTemplateOutput) ToConfigurationTemplateOutput() ConfigurationTemplateOutput { 273 return o 274 } 275 276 func (o ConfigurationTemplateOutput) ToConfigurationTemplateOutputWithContext(ctx context.Context) ConfigurationTemplateOutput { 277 return o 278 } 279 280 // name of the application to associate with this configuration template 281 func (o ConfigurationTemplateOutput) Application() pulumi.StringOutput { 282 return o.ApplyT(func(v *ConfigurationTemplate) pulumi.StringOutput { return v.Application }).(pulumi.StringOutput) 283 } 284 285 // Short description of the Template 286 func (o ConfigurationTemplateOutput) Description() pulumi.StringPtrOutput { 287 return o.ApplyT(func(v *ConfigurationTemplate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 288 } 289 290 // The ID of the environment used with this configuration template 291 func (o ConfigurationTemplateOutput) EnvironmentId() pulumi.StringPtrOutput { 292 return o.ApplyT(func(v *ConfigurationTemplate) pulumi.StringPtrOutput { return v.EnvironmentId }).(pulumi.StringPtrOutput) 293 } 294 295 // A unique name for this Template. 296 func (o ConfigurationTemplateOutput) Name() pulumi.StringOutput { 297 return o.ApplyT(func(v *ConfigurationTemplate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 298 } 299 300 // Option settings to configure the new Environment. These 301 // override specific values that are set as defaults. The format is detailed 302 // below in Option Settings 303 func (o ConfigurationTemplateOutput) Settings() ConfigurationTemplateSettingArrayOutput { 304 return o.ApplyT(func(v *ConfigurationTemplate) ConfigurationTemplateSettingArrayOutput { return v.Settings }).(ConfigurationTemplateSettingArrayOutput) 305 } 306 307 // A solution stack to base your Template 308 // off of. Example stacks can be found in the [Amazon API documentation][1] 309 func (o ConfigurationTemplateOutput) SolutionStackName() pulumi.StringPtrOutput { 310 return o.ApplyT(func(v *ConfigurationTemplate) pulumi.StringPtrOutput { return v.SolutionStackName }).(pulumi.StringPtrOutput) 311 } 312 313 type ConfigurationTemplateArrayOutput struct{ *pulumi.OutputState } 314 315 func (ConfigurationTemplateArrayOutput) ElementType() reflect.Type { 316 return reflect.TypeOf((*[]*ConfigurationTemplate)(nil)).Elem() 317 } 318 319 func (o ConfigurationTemplateArrayOutput) ToConfigurationTemplateArrayOutput() ConfigurationTemplateArrayOutput { 320 return o 321 } 322 323 func (o ConfigurationTemplateArrayOutput) ToConfigurationTemplateArrayOutputWithContext(ctx context.Context) ConfigurationTemplateArrayOutput { 324 return o 325 } 326 327 func (o ConfigurationTemplateArrayOutput) Index(i pulumi.IntInput) ConfigurationTemplateOutput { 328 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationTemplate { 329 return vs[0].([]*ConfigurationTemplate)[vs[1].(int)] 330 }).(ConfigurationTemplateOutput) 331 } 332 333 type ConfigurationTemplateMapOutput struct{ *pulumi.OutputState } 334 335 func (ConfigurationTemplateMapOutput) ElementType() reflect.Type { 336 return reflect.TypeOf((*map[string]*ConfigurationTemplate)(nil)).Elem() 337 } 338 339 func (o ConfigurationTemplateMapOutput) ToConfigurationTemplateMapOutput() ConfigurationTemplateMapOutput { 340 return o 341 } 342 343 func (o ConfigurationTemplateMapOutput) ToConfigurationTemplateMapOutputWithContext(ctx context.Context) ConfigurationTemplateMapOutput { 344 return o 345 } 346 347 func (o ConfigurationTemplateMapOutput) MapIndex(k pulumi.StringInput) ConfigurationTemplateOutput { 348 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationTemplate { 349 return vs[0].(map[string]*ConfigurationTemplate)[vs[1].(string)] 350 }).(ConfigurationTemplateOutput) 351 } 352 353 func init() { 354 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationTemplateInput)(nil)).Elem(), &ConfigurationTemplate{}) 355 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationTemplateArrayInput)(nil)).Elem(), ConfigurationTemplateArray{}) 356 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationTemplateMapInput)(nil)).Elem(), ConfigurationTemplateMap{}) 357 pulumi.RegisterOutputType(ConfigurationTemplateOutput{}) 358 pulumi.RegisterOutputType(ConfigurationTemplateArrayOutput{}) 359 pulumi.RegisterOutputType(ConfigurationTemplateMapOutput{}) 360 }