github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloudformation/stackSetInstance.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 cloudformation 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 // Manages a CloudFormation StackSet Instance. Instances are managed in the account and region of the StackSet after the target account permissions have been configured. Additional information about StackSets can be found in the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html). 16 // 17 // > **NOTE:** All target accounts must have an IAM Role created that matches the name of the execution role configured in the StackSet (the `executionRoleName` argument in the `cloudformation.StackSet` resource) in a trust relationship with the administrative account or administration IAM Role. The execution role must have appropriate permissions to manage resources defined in the template along with those required for StackSets to operate. See the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) for more details. 18 // 19 // > **NOTE:** To retain the Stack during resource destroy, ensure `retainStack` has been set to `true` in the state first. This must be completed _before_ a deployment that would destroy the resource. 20 // 21 // ## Example Usage 22 // 23 // ### Basic Usage 24 // 25 // <!--Start PulumiCodeChooser --> 26 // ```go 27 // package main 28 // 29 // import ( 30 // 31 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudformation" 32 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 33 // 34 // ) 35 // 36 // func main() { 37 // pulumi.Run(func(ctx *pulumi.Context) error { 38 // _, err := cloudformation.NewStackSetInstance(ctx, "example", &cloudformation.StackSetInstanceArgs{ 39 // AccountId: pulumi.String("123456789012"), 40 // Region: pulumi.String("us-east-1"), 41 // StackSetName: pulumi.Any(exampleAwsCloudformationStackSet.Name), 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### Example IAM Setup in Target Account 54 // 55 // <!--Start PulumiCodeChooser --> 56 // ```go 57 // package main 58 // 59 // import ( 60 // 61 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 62 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 63 // 64 // ) 65 // func main() { 66 // pulumi.Run(func(ctx *pulumi.Context) error { 67 // aWSCloudFormationStackSetExecutionRoleAssumeRolePolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 68 // Statements: []iam.GetPolicyDocumentStatement{ 69 // { 70 // Actions: []string{ 71 // "sts:AssumeRole", 72 // }, 73 // Effect: pulumi.StringRef("Allow"), 74 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 75 // { 76 // Identifiers: interface{}{ 77 // aWSCloudFormationStackSetAdministrationRole.Arn, 78 // }, 79 // Type: "AWS", 80 // }, 81 // }, 82 // }, 83 // }, 84 // }, nil); 85 // if err != nil { 86 // return err 87 // } 88 // aWSCloudFormationStackSetExecutionRole, err := iam.NewRole(ctx, "AWSCloudFormationStackSetExecutionRole", &iam.RoleArgs{ 89 // AssumeRolePolicy: pulumi.String(aWSCloudFormationStackSetExecutionRoleAssumeRolePolicy.Json), 90 // Name: pulumi.String("AWSCloudFormationStackSetExecutionRole"), 91 // }) 92 // if err != nil { 93 // return err 94 // } 95 // // Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html 96 // // Additional IAM permissions necessary depend on the resources defined in the StackSet template 97 // aWSCloudFormationStackSetExecutionRoleMinimumExecutionPolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 98 // Statements: []iam.GetPolicyDocumentStatement{ 99 // { 100 // Actions: []string{ 101 // "cloudformation:*", 102 // "s3:*", 103 // "sns:*", 104 // }, 105 // Effect: pulumi.StringRef("Allow"), 106 // Resources: []string{ 107 // "*", 108 // }, 109 // }, 110 // }, 111 // }, nil); 112 // if err != nil { 113 // return err 114 // } 115 // _, err = iam.NewRolePolicy(ctx, "AWSCloudFormationStackSetExecutionRole_MinimumExecutionPolicy", &iam.RolePolicyArgs{ 116 // Name: pulumi.String("MinimumExecutionPolicy"), 117 // Policy: pulumi.String(aWSCloudFormationStackSetExecutionRoleMinimumExecutionPolicy.Json), 118 // Role: aWSCloudFormationStackSetExecutionRole.Name, 119 // }) 120 // if err != nil { 121 // return err 122 // } 123 // return nil 124 // }) 125 // } 126 // ``` 127 // <!--End PulumiCodeChooser --> 128 // 129 // ### Example Deployment across Organizations account 130 // 131 // <!--Start PulumiCodeChooser --> 132 // ```go 133 // package main 134 // 135 // import ( 136 // 137 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudformation" 138 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 139 // 140 // ) 141 // 142 // func main() { 143 // pulumi.Run(func(ctx *pulumi.Context) error { 144 // _, err := cloudformation.NewStackSetInstance(ctx, "example", &cloudformation.StackSetInstanceArgs{ 145 // DeploymentTargets: &cloudformation.StackSetInstanceDeploymentTargetsArgs{ 146 // OrganizationalUnitIds: pulumi.StringArray{ 147 // exampleAwsOrganizationsOrganization.Roots[0].Id, 148 // }, 149 // }, 150 // Region: pulumi.String("us-east-1"), 151 // StackSetName: pulumi.Any(exampleAwsCloudformationStackSet.Name), 152 // }) 153 // if err != nil { 154 // return err 155 // } 156 // return nil 157 // }) 158 // } 159 // 160 // ``` 161 // <!--End PulumiCodeChooser --> 162 // 163 // ## Import 164 // 165 // Import CloudFormation StackSet Instances that target AWS Organizational Units using the StackSet name, a slash (`/`) separated list of organizational unit IDs, and target AWS Region separated by commas (`,`). For example: 166 // 167 // Import CloudFormation StackSet Instances when acting a delegated administrator in a member account using the StackSet name, target AWS account ID or slash (`/`) separated list of organizational unit IDs, target AWS Region and `call_as` value separated by commas (`,`). For example: 168 // 169 // Using `pulumi import`, import CloudFormation StackSet Instances that target an AWS Account ID using the StackSet name, target AWS account ID, and target AWS Region separated by commas (`,`). For example: 170 // 171 // ```sh 172 // $ pulumi import aws:cloudformation/stackSetInstance:StackSetInstance example example,123456789012,us-east-1 173 // ``` 174 // Using `pulumi import`, import CloudFormation StackSet Instances that target AWS Organizational Units using the StackSet name, a slash (`/`) separated list of organizational unit IDs, and target AWS Region separated by commas (`,`). For example: 175 // 176 // ```sh 177 // $ pulumi import aws:cloudformation/stackSetInstance:StackSetInstance example example,ou-sdas-123123123/ou-sdas-789789789,us-east-1 178 // ``` 179 // Using `pulumi import`, import CloudFormation StackSet Instances when acting a delegated administrator in a member account using the StackSet name, target AWS account ID or slash (`/`) separated list of organizational unit IDs, target AWS Region and `call_as` value separated by commas (`,`). For example: 180 // 181 // ```sh 182 // $ pulumi import aws:cloudformation/stackSetInstance:StackSetInstance example example,ou-sdas-123123123/ou-sdas-789789789,us-east-1,DELEGATED_ADMIN 183 // ``` 184 type StackSetInstance struct { 185 pulumi.CustomResourceState 186 187 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 188 AccountId pulumi.StringOutput `pulumi:"accountId"` 189 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 190 CallAs pulumi.StringPtrOutput `pulumi:"callAs"` 191 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 192 DeploymentTargets StackSetInstanceDeploymentTargetsPtrOutput `pulumi:"deploymentTargets"` 193 // Preferences for how AWS CloudFormation performs a stack set operation. 194 OperationPreferences StackSetInstanceOperationPreferencesPtrOutput `pulumi:"operationPreferences"` 195 // Organizational unit ID in which the stack is deployed. 196 OrganizationalUnitId pulumi.StringOutput `pulumi:"organizationalUnitId"` 197 // Key-value map of input parameters to override from the StackSet for this Instance. 198 ParameterOverrides pulumi.StringMapOutput `pulumi:"parameterOverrides"` 199 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 200 Region pulumi.StringOutput `pulumi:"region"` 201 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 202 RetainStack pulumi.BoolPtrOutput `pulumi:"retainStack"` 203 // Stack identifier. 204 StackId pulumi.StringOutput `pulumi:"stackId"` 205 // List of stack instances created from an organizational unit deployment target. This will only be populated when `deploymentTargets` is set. See `stackInstanceSummaries`. 206 StackInstanceSummaries StackSetInstanceStackInstanceSummaryArrayOutput `pulumi:"stackInstanceSummaries"` 207 // Name of the StackSet. 208 StackSetName pulumi.StringOutput `pulumi:"stackSetName"` 209 } 210 211 // NewStackSetInstance registers a new resource with the given unique name, arguments, and options. 212 func NewStackSetInstance(ctx *pulumi.Context, 213 name string, args *StackSetInstanceArgs, opts ...pulumi.ResourceOption) (*StackSetInstance, error) { 214 if args == nil { 215 return nil, errors.New("missing one or more required arguments") 216 } 217 218 if args.StackSetName == nil { 219 return nil, errors.New("invalid value for required argument 'StackSetName'") 220 } 221 opts = internal.PkgResourceDefaultOpts(opts) 222 var resource StackSetInstance 223 err := ctx.RegisterResource("aws:cloudformation/stackSetInstance:StackSetInstance", name, args, &resource, opts...) 224 if err != nil { 225 return nil, err 226 } 227 return &resource, nil 228 } 229 230 // GetStackSetInstance gets an existing StackSetInstance resource's state with the given name, ID, and optional 231 // state properties that are used to uniquely qualify the lookup (nil if not required). 232 func GetStackSetInstance(ctx *pulumi.Context, 233 name string, id pulumi.IDInput, state *StackSetInstanceState, opts ...pulumi.ResourceOption) (*StackSetInstance, error) { 234 var resource StackSetInstance 235 err := ctx.ReadResource("aws:cloudformation/stackSetInstance:StackSetInstance", name, id, state, &resource, opts...) 236 if err != nil { 237 return nil, err 238 } 239 return &resource, nil 240 } 241 242 // Input properties used for looking up and filtering StackSetInstance resources. 243 type stackSetInstanceState struct { 244 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 245 AccountId *string `pulumi:"accountId"` 246 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 247 CallAs *string `pulumi:"callAs"` 248 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 249 DeploymentTargets *StackSetInstanceDeploymentTargets `pulumi:"deploymentTargets"` 250 // Preferences for how AWS CloudFormation performs a stack set operation. 251 OperationPreferences *StackSetInstanceOperationPreferences `pulumi:"operationPreferences"` 252 // Organizational unit ID in which the stack is deployed. 253 OrganizationalUnitId *string `pulumi:"organizationalUnitId"` 254 // Key-value map of input parameters to override from the StackSet for this Instance. 255 ParameterOverrides map[string]string `pulumi:"parameterOverrides"` 256 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 257 Region *string `pulumi:"region"` 258 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 259 RetainStack *bool `pulumi:"retainStack"` 260 // Stack identifier. 261 StackId *string `pulumi:"stackId"` 262 // List of stack instances created from an organizational unit deployment target. This will only be populated when `deploymentTargets` is set. See `stackInstanceSummaries`. 263 StackInstanceSummaries []StackSetInstanceStackInstanceSummary `pulumi:"stackInstanceSummaries"` 264 // Name of the StackSet. 265 StackSetName *string `pulumi:"stackSetName"` 266 } 267 268 type StackSetInstanceState struct { 269 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 270 AccountId pulumi.StringPtrInput 271 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 272 CallAs pulumi.StringPtrInput 273 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 274 DeploymentTargets StackSetInstanceDeploymentTargetsPtrInput 275 // Preferences for how AWS CloudFormation performs a stack set operation. 276 OperationPreferences StackSetInstanceOperationPreferencesPtrInput 277 // Organizational unit ID in which the stack is deployed. 278 OrganizationalUnitId pulumi.StringPtrInput 279 // Key-value map of input parameters to override from the StackSet for this Instance. 280 ParameterOverrides pulumi.StringMapInput 281 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 282 Region pulumi.StringPtrInput 283 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 284 RetainStack pulumi.BoolPtrInput 285 // Stack identifier. 286 StackId pulumi.StringPtrInput 287 // List of stack instances created from an organizational unit deployment target. This will only be populated when `deploymentTargets` is set. See `stackInstanceSummaries`. 288 StackInstanceSummaries StackSetInstanceStackInstanceSummaryArrayInput 289 // Name of the StackSet. 290 StackSetName pulumi.StringPtrInput 291 } 292 293 func (StackSetInstanceState) ElementType() reflect.Type { 294 return reflect.TypeOf((*stackSetInstanceState)(nil)).Elem() 295 } 296 297 type stackSetInstanceArgs struct { 298 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 299 AccountId *string `pulumi:"accountId"` 300 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 301 CallAs *string `pulumi:"callAs"` 302 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 303 DeploymentTargets *StackSetInstanceDeploymentTargets `pulumi:"deploymentTargets"` 304 // Preferences for how AWS CloudFormation performs a stack set operation. 305 OperationPreferences *StackSetInstanceOperationPreferences `pulumi:"operationPreferences"` 306 // Key-value map of input parameters to override from the StackSet for this Instance. 307 ParameterOverrides map[string]string `pulumi:"parameterOverrides"` 308 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 309 Region *string `pulumi:"region"` 310 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 311 RetainStack *bool `pulumi:"retainStack"` 312 // Name of the StackSet. 313 StackSetName string `pulumi:"stackSetName"` 314 } 315 316 // The set of arguments for constructing a StackSetInstance resource. 317 type StackSetInstanceArgs struct { 318 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 319 AccountId pulumi.StringPtrInput 320 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 321 CallAs pulumi.StringPtrInput 322 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 323 DeploymentTargets StackSetInstanceDeploymentTargetsPtrInput 324 // Preferences for how AWS CloudFormation performs a stack set operation. 325 OperationPreferences StackSetInstanceOperationPreferencesPtrInput 326 // Key-value map of input parameters to override from the StackSet for this Instance. 327 ParameterOverrides pulumi.StringMapInput 328 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 329 Region pulumi.StringPtrInput 330 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 331 RetainStack pulumi.BoolPtrInput 332 // Name of the StackSet. 333 StackSetName pulumi.StringInput 334 } 335 336 func (StackSetInstanceArgs) ElementType() reflect.Type { 337 return reflect.TypeOf((*stackSetInstanceArgs)(nil)).Elem() 338 } 339 340 type StackSetInstanceInput interface { 341 pulumi.Input 342 343 ToStackSetInstanceOutput() StackSetInstanceOutput 344 ToStackSetInstanceOutputWithContext(ctx context.Context) StackSetInstanceOutput 345 } 346 347 func (*StackSetInstance) ElementType() reflect.Type { 348 return reflect.TypeOf((**StackSetInstance)(nil)).Elem() 349 } 350 351 func (i *StackSetInstance) ToStackSetInstanceOutput() StackSetInstanceOutput { 352 return i.ToStackSetInstanceOutputWithContext(context.Background()) 353 } 354 355 func (i *StackSetInstance) ToStackSetInstanceOutputWithContext(ctx context.Context) StackSetInstanceOutput { 356 return pulumi.ToOutputWithContext(ctx, i).(StackSetInstanceOutput) 357 } 358 359 // StackSetInstanceArrayInput is an input type that accepts StackSetInstanceArray and StackSetInstanceArrayOutput values. 360 // You can construct a concrete instance of `StackSetInstanceArrayInput` via: 361 // 362 // StackSetInstanceArray{ StackSetInstanceArgs{...} } 363 type StackSetInstanceArrayInput interface { 364 pulumi.Input 365 366 ToStackSetInstanceArrayOutput() StackSetInstanceArrayOutput 367 ToStackSetInstanceArrayOutputWithContext(context.Context) StackSetInstanceArrayOutput 368 } 369 370 type StackSetInstanceArray []StackSetInstanceInput 371 372 func (StackSetInstanceArray) ElementType() reflect.Type { 373 return reflect.TypeOf((*[]*StackSetInstance)(nil)).Elem() 374 } 375 376 func (i StackSetInstanceArray) ToStackSetInstanceArrayOutput() StackSetInstanceArrayOutput { 377 return i.ToStackSetInstanceArrayOutputWithContext(context.Background()) 378 } 379 380 func (i StackSetInstanceArray) ToStackSetInstanceArrayOutputWithContext(ctx context.Context) StackSetInstanceArrayOutput { 381 return pulumi.ToOutputWithContext(ctx, i).(StackSetInstanceArrayOutput) 382 } 383 384 // StackSetInstanceMapInput is an input type that accepts StackSetInstanceMap and StackSetInstanceMapOutput values. 385 // You can construct a concrete instance of `StackSetInstanceMapInput` via: 386 // 387 // StackSetInstanceMap{ "key": StackSetInstanceArgs{...} } 388 type StackSetInstanceMapInput interface { 389 pulumi.Input 390 391 ToStackSetInstanceMapOutput() StackSetInstanceMapOutput 392 ToStackSetInstanceMapOutputWithContext(context.Context) StackSetInstanceMapOutput 393 } 394 395 type StackSetInstanceMap map[string]StackSetInstanceInput 396 397 func (StackSetInstanceMap) ElementType() reflect.Type { 398 return reflect.TypeOf((*map[string]*StackSetInstance)(nil)).Elem() 399 } 400 401 func (i StackSetInstanceMap) ToStackSetInstanceMapOutput() StackSetInstanceMapOutput { 402 return i.ToStackSetInstanceMapOutputWithContext(context.Background()) 403 } 404 405 func (i StackSetInstanceMap) ToStackSetInstanceMapOutputWithContext(ctx context.Context) StackSetInstanceMapOutput { 406 return pulumi.ToOutputWithContext(ctx, i).(StackSetInstanceMapOutput) 407 } 408 409 type StackSetInstanceOutput struct{ *pulumi.OutputState } 410 411 func (StackSetInstanceOutput) ElementType() reflect.Type { 412 return reflect.TypeOf((**StackSetInstance)(nil)).Elem() 413 } 414 415 func (o StackSetInstanceOutput) ToStackSetInstanceOutput() StackSetInstanceOutput { 416 return o 417 } 418 419 func (o StackSetInstanceOutput) ToStackSetInstanceOutputWithContext(ctx context.Context) StackSetInstanceOutput { 420 return o 421 } 422 423 // Target AWS Account ID to create a Stack based on the StackSet. Defaults to current account. 424 func (o StackSetInstanceOutput) AccountId() pulumi.StringOutput { 425 return o.ApplyT(func(v *StackSetInstance) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput) 426 } 427 428 // Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`. 429 func (o StackSetInstanceOutput) CallAs() pulumi.StringPtrOutput { 430 return o.ApplyT(func(v *StackSetInstance) pulumi.StringPtrOutput { return v.CallAs }).(pulumi.StringPtrOutput) 431 } 432 433 // The AWS Organizations accounts to which StackSets deploys. StackSets doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization. Drift detection is not possible for this argument. See deploymentTargets below. 434 func (o StackSetInstanceOutput) DeploymentTargets() StackSetInstanceDeploymentTargetsPtrOutput { 435 return o.ApplyT(func(v *StackSetInstance) StackSetInstanceDeploymentTargetsPtrOutput { return v.DeploymentTargets }).(StackSetInstanceDeploymentTargetsPtrOutput) 436 } 437 438 // Preferences for how AWS CloudFormation performs a stack set operation. 439 func (o StackSetInstanceOutput) OperationPreferences() StackSetInstanceOperationPreferencesPtrOutput { 440 return o.ApplyT(func(v *StackSetInstance) StackSetInstanceOperationPreferencesPtrOutput { return v.OperationPreferences }).(StackSetInstanceOperationPreferencesPtrOutput) 441 } 442 443 // Organizational unit ID in which the stack is deployed. 444 func (o StackSetInstanceOutput) OrganizationalUnitId() pulumi.StringOutput { 445 return o.ApplyT(func(v *StackSetInstance) pulumi.StringOutput { return v.OrganizationalUnitId }).(pulumi.StringOutput) 446 } 447 448 // Key-value map of input parameters to override from the StackSet for this Instance. 449 func (o StackSetInstanceOutput) ParameterOverrides() pulumi.StringMapOutput { 450 return o.ApplyT(func(v *StackSetInstance) pulumi.StringMapOutput { return v.ParameterOverrides }).(pulumi.StringMapOutput) 451 } 452 453 // Target AWS Region to create a Stack based on the StackSet. Defaults to current region. 454 func (o StackSetInstanceOutput) Region() pulumi.StringOutput { 455 return o.ApplyT(func(v *StackSetInstance) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) 456 } 457 458 // During resource destroy, remove Instance from StackSet while keeping the Stack and its associated resources. Must be enabled in the state _before_ destroy operation to take effect. You cannot reassociate a retained Stack or add an existing, saved Stack to a new StackSet. Defaults to `false`. 459 func (o StackSetInstanceOutput) RetainStack() pulumi.BoolPtrOutput { 460 return o.ApplyT(func(v *StackSetInstance) pulumi.BoolPtrOutput { return v.RetainStack }).(pulumi.BoolPtrOutput) 461 } 462 463 // Stack identifier. 464 func (o StackSetInstanceOutput) StackId() pulumi.StringOutput { 465 return o.ApplyT(func(v *StackSetInstance) pulumi.StringOutput { return v.StackId }).(pulumi.StringOutput) 466 } 467 468 // List of stack instances created from an organizational unit deployment target. This will only be populated when `deploymentTargets` is set. See `stackInstanceSummaries`. 469 func (o StackSetInstanceOutput) StackInstanceSummaries() StackSetInstanceStackInstanceSummaryArrayOutput { 470 return o.ApplyT(func(v *StackSetInstance) StackSetInstanceStackInstanceSummaryArrayOutput { 471 return v.StackInstanceSummaries 472 }).(StackSetInstanceStackInstanceSummaryArrayOutput) 473 } 474 475 // Name of the StackSet. 476 func (o StackSetInstanceOutput) StackSetName() pulumi.StringOutput { 477 return o.ApplyT(func(v *StackSetInstance) pulumi.StringOutput { return v.StackSetName }).(pulumi.StringOutput) 478 } 479 480 type StackSetInstanceArrayOutput struct{ *pulumi.OutputState } 481 482 func (StackSetInstanceArrayOutput) ElementType() reflect.Type { 483 return reflect.TypeOf((*[]*StackSetInstance)(nil)).Elem() 484 } 485 486 func (o StackSetInstanceArrayOutput) ToStackSetInstanceArrayOutput() StackSetInstanceArrayOutput { 487 return o 488 } 489 490 func (o StackSetInstanceArrayOutput) ToStackSetInstanceArrayOutputWithContext(ctx context.Context) StackSetInstanceArrayOutput { 491 return o 492 } 493 494 func (o StackSetInstanceArrayOutput) Index(i pulumi.IntInput) StackSetInstanceOutput { 495 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StackSetInstance { 496 return vs[0].([]*StackSetInstance)[vs[1].(int)] 497 }).(StackSetInstanceOutput) 498 } 499 500 type StackSetInstanceMapOutput struct{ *pulumi.OutputState } 501 502 func (StackSetInstanceMapOutput) ElementType() reflect.Type { 503 return reflect.TypeOf((*map[string]*StackSetInstance)(nil)).Elem() 504 } 505 506 func (o StackSetInstanceMapOutput) ToStackSetInstanceMapOutput() StackSetInstanceMapOutput { 507 return o 508 } 509 510 func (o StackSetInstanceMapOutput) ToStackSetInstanceMapOutputWithContext(ctx context.Context) StackSetInstanceMapOutput { 511 return o 512 } 513 514 func (o StackSetInstanceMapOutput) MapIndex(k pulumi.StringInput) StackSetInstanceOutput { 515 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StackSetInstance { 516 return vs[0].(map[string]*StackSetInstance)[vs[1].(string)] 517 }).(StackSetInstanceOutput) 518 } 519 520 func init() { 521 pulumi.RegisterInputType(reflect.TypeOf((*StackSetInstanceInput)(nil)).Elem(), &StackSetInstance{}) 522 pulumi.RegisterInputType(reflect.TypeOf((*StackSetInstanceArrayInput)(nil)).Elem(), StackSetInstanceArray{}) 523 pulumi.RegisterInputType(reflect.TypeOf((*StackSetInstanceMapInput)(nil)).Elem(), StackSetInstanceMap{}) 524 pulumi.RegisterOutputType(StackSetInstanceOutput{}) 525 pulumi.RegisterOutputType(StackSetInstanceArrayOutput{}) 526 pulumi.RegisterOutputType(StackSetInstanceMapOutput{}) 527 }