github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/controltower/landingZone.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 controltower
     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  // Creates a new landing zone using Control Tower. For more information on usage, please see the
    16  // [AWS Control Tower Landing Zone User Guide](https://docs.aws.amazon.com/controltower/latest/userguide/how-control-tower-works.html).
    17  //
    18  // ## Import
    19  //
    20  // Using `pulumi import`, import a Control Tower Landing Zone using the `id`. For example:
    21  //
    22  // ```sh
    23  // $ pulumi import aws:controltower/landingZone:LandingZone example 1A2B3C4D5E6F7G8H
    24  // ```
    25  type LandingZone struct {
    26  	pulumi.CustomResourceState
    27  
    28  	// The ARN of the landing zone.
    29  	Arn pulumi.StringOutput `pulumi:"arn"`
    30  	// The drift status summary of the landing zone.
    31  	DriftStatuses LandingZoneDriftStatusArrayOutput `pulumi:"driftStatuses"`
    32  	// The latest available version of the landing zone.
    33  	LatestAvailableVersion pulumi.StringOutput `pulumi:"latestAvailableVersion"`
    34  	// The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
    35  	ManifestJson pulumi.StringOutput `pulumi:"manifestJson"`
    36  	// Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    37  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    38  	// A map of tags assigned to the landing zone, including those inherited from the provider `defaultTags` configuration block.
    39  	//
    40  	// Deprecated: Please use `tags` instead.
    41  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    42  	// The landing zone version.
    43  	Version pulumi.StringOutput `pulumi:"version"`
    44  }
    45  
    46  // NewLandingZone registers a new resource with the given unique name, arguments, and options.
    47  func NewLandingZone(ctx *pulumi.Context,
    48  	name string, args *LandingZoneArgs, opts ...pulumi.ResourceOption) (*LandingZone, error) {
    49  	if args == nil {
    50  		return nil, errors.New("missing one or more required arguments")
    51  	}
    52  
    53  	if args.ManifestJson == nil {
    54  		return nil, errors.New("invalid value for required argument 'ManifestJson'")
    55  	}
    56  	if args.Version == nil {
    57  		return nil, errors.New("invalid value for required argument 'Version'")
    58  	}
    59  	opts = internal.PkgResourceDefaultOpts(opts)
    60  	var resource LandingZone
    61  	err := ctx.RegisterResource("aws:controltower/landingZone:LandingZone", name, args, &resource, opts...)
    62  	if err != nil {
    63  		return nil, err
    64  	}
    65  	return &resource, nil
    66  }
    67  
    68  // GetLandingZone gets an existing LandingZone resource's state with the given name, ID, and optional
    69  // state properties that are used to uniquely qualify the lookup (nil if not required).
    70  func GetLandingZone(ctx *pulumi.Context,
    71  	name string, id pulumi.IDInput, state *LandingZoneState, opts ...pulumi.ResourceOption) (*LandingZone, error) {
    72  	var resource LandingZone
    73  	err := ctx.ReadResource("aws:controltower/landingZone:LandingZone", name, id, state, &resource, opts...)
    74  	if err != nil {
    75  		return nil, err
    76  	}
    77  	return &resource, nil
    78  }
    79  
    80  // Input properties used for looking up and filtering LandingZone resources.
    81  type landingZoneState struct {
    82  	// The ARN of the landing zone.
    83  	Arn *string `pulumi:"arn"`
    84  	// The drift status summary of the landing zone.
    85  	DriftStatuses []LandingZoneDriftStatus `pulumi:"driftStatuses"`
    86  	// The latest available version of the landing zone.
    87  	LatestAvailableVersion *string `pulumi:"latestAvailableVersion"`
    88  	// The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
    89  	ManifestJson *string `pulumi:"manifestJson"`
    90  	// Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    91  	Tags map[string]string `pulumi:"tags"`
    92  	// A map of tags assigned to the landing zone, including those inherited from the provider `defaultTags` configuration block.
    93  	//
    94  	// Deprecated: Please use `tags` instead.
    95  	TagsAll map[string]string `pulumi:"tagsAll"`
    96  	// The landing zone version.
    97  	Version *string `pulumi:"version"`
    98  }
    99  
   100  type LandingZoneState struct {
   101  	// The ARN of the landing zone.
   102  	Arn pulumi.StringPtrInput
   103  	// The drift status summary of the landing zone.
   104  	DriftStatuses LandingZoneDriftStatusArrayInput
   105  	// The latest available version of the landing zone.
   106  	LatestAvailableVersion pulumi.StringPtrInput
   107  	// The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
   108  	ManifestJson pulumi.StringPtrInput
   109  	// Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   110  	Tags pulumi.StringMapInput
   111  	// A map of tags assigned to the landing zone, including those inherited from the provider `defaultTags` configuration block.
   112  	//
   113  	// Deprecated: Please use `tags` instead.
   114  	TagsAll pulumi.StringMapInput
   115  	// The landing zone version.
   116  	Version pulumi.StringPtrInput
   117  }
   118  
   119  func (LandingZoneState) ElementType() reflect.Type {
   120  	return reflect.TypeOf((*landingZoneState)(nil)).Elem()
   121  }
   122  
   123  type landingZoneArgs struct {
   124  	// The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
   125  	ManifestJson string `pulumi:"manifestJson"`
   126  	// Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   127  	Tags map[string]string `pulumi:"tags"`
   128  	// The landing zone version.
   129  	Version string `pulumi:"version"`
   130  }
   131  
   132  // The set of arguments for constructing a LandingZone resource.
   133  type LandingZoneArgs struct {
   134  	// The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
   135  	ManifestJson pulumi.StringInput
   136  	// Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   137  	Tags pulumi.StringMapInput
   138  	// The landing zone version.
   139  	Version pulumi.StringInput
   140  }
   141  
   142  func (LandingZoneArgs) ElementType() reflect.Type {
   143  	return reflect.TypeOf((*landingZoneArgs)(nil)).Elem()
   144  }
   145  
   146  type LandingZoneInput interface {
   147  	pulumi.Input
   148  
   149  	ToLandingZoneOutput() LandingZoneOutput
   150  	ToLandingZoneOutputWithContext(ctx context.Context) LandingZoneOutput
   151  }
   152  
   153  func (*LandingZone) ElementType() reflect.Type {
   154  	return reflect.TypeOf((**LandingZone)(nil)).Elem()
   155  }
   156  
   157  func (i *LandingZone) ToLandingZoneOutput() LandingZoneOutput {
   158  	return i.ToLandingZoneOutputWithContext(context.Background())
   159  }
   160  
   161  func (i *LandingZone) ToLandingZoneOutputWithContext(ctx context.Context) LandingZoneOutput {
   162  	return pulumi.ToOutputWithContext(ctx, i).(LandingZoneOutput)
   163  }
   164  
   165  // LandingZoneArrayInput is an input type that accepts LandingZoneArray and LandingZoneArrayOutput values.
   166  // You can construct a concrete instance of `LandingZoneArrayInput` via:
   167  //
   168  //	LandingZoneArray{ LandingZoneArgs{...} }
   169  type LandingZoneArrayInput interface {
   170  	pulumi.Input
   171  
   172  	ToLandingZoneArrayOutput() LandingZoneArrayOutput
   173  	ToLandingZoneArrayOutputWithContext(context.Context) LandingZoneArrayOutput
   174  }
   175  
   176  type LandingZoneArray []LandingZoneInput
   177  
   178  func (LandingZoneArray) ElementType() reflect.Type {
   179  	return reflect.TypeOf((*[]*LandingZone)(nil)).Elem()
   180  }
   181  
   182  func (i LandingZoneArray) ToLandingZoneArrayOutput() LandingZoneArrayOutput {
   183  	return i.ToLandingZoneArrayOutputWithContext(context.Background())
   184  }
   185  
   186  func (i LandingZoneArray) ToLandingZoneArrayOutputWithContext(ctx context.Context) LandingZoneArrayOutput {
   187  	return pulumi.ToOutputWithContext(ctx, i).(LandingZoneArrayOutput)
   188  }
   189  
   190  // LandingZoneMapInput is an input type that accepts LandingZoneMap and LandingZoneMapOutput values.
   191  // You can construct a concrete instance of `LandingZoneMapInput` via:
   192  //
   193  //	LandingZoneMap{ "key": LandingZoneArgs{...} }
   194  type LandingZoneMapInput interface {
   195  	pulumi.Input
   196  
   197  	ToLandingZoneMapOutput() LandingZoneMapOutput
   198  	ToLandingZoneMapOutputWithContext(context.Context) LandingZoneMapOutput
   199  }
   200  
   201  type LandingZoneMap map[string]LandingZoneInput
   202  
   203  func (LandingZoneMap) ElementType() reflect.Type {
   204  	return reflect.TypeOf((*map[string]*LandingZone)(nil)).Elem()
   205  }
   206  
   207  func (i LandingZoneMap) ToLandingZoneMapOutput() LandingZoneMapOutput {
   208  	return i.ToLandingZoneMapOutputWithContext(context.Background())
   209  }
   210  
   211  func (i LandingZoneMap) ToLandingZoneMapOutputWithContext(ctx context.Context) LandingZoneMapOutput {
   212  	return pulumi.ToOutputWithContext(ctx, i).(LandingZoneMapOutput)
   213  }
   214  
   215  type LandingZoneOutput struct{ *pulumi.OutputState }
   216  
   217  func (LandingZoneOutput) ElementType() reflect.Type {
   218  	return reflect.TypeOf((**LandingZone)(nil)).Elem()
   219  }
   220  
   221  func (o LandingZoneOutput) ToLandingZoneOutput() LandingZoneOutput {
   222  	return o
   223  }
   224  
   225  func (o LandingZoneOutput) ToLandingZoneOutputWithContext(ctx context.Context) LandingZoneOutput {
   226  	return o
   227  }
   228  
   229  // The ARN of the landing zone.
   230  func (o LandingZoneOutput) Arn() pulumi.StringOutput {
   231  	return o.ApplyT(func(v *LandingZone) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   232  }
   233  
   234  // The drift status summary of the landing zone.
   235  func (o LandingZoneOutput) DriftStatuses() LandingZoneDriftStatusArrayOutput {
   236  	return o.ApplyT(func(v *LandingZone) LandingZoneDriftStatusArrayOutput { return v.DriftStatuses }).(LandingZoneDriftStatusArrayOutput)
   237  }
   238  
   239  // The latest available version of the landing zone.
   240  func (o LandingZoneOutput) LatestAvailableVersion() pulumi.StringOutput {
   241  	return o.ApplyT(func(v *LandingZone) pulumi.StringOutput { return v.LatestAvailableVersion }).(pulumi.StringOutput)
   242  }
   243  
   244  // The manifest JSON file is a text file that describes your AWS resources. For examples, review [Launch your landing zone](https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch).
   245  func (o LandingZoneOutput) ManifestJson() pulumi.StringOutput {
   246  	return o.ApplyT(func(v *LandingZone) pulumi.StringOutput { return v.ManifestJson }).(pulumi.StringOutput)
   247  }
   248  
   249  // Tags to apply to the landing zone. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   250  func (o LandingZoneOutput) Tags() pulumi.StringMapOutput {
   251  	return o.ApplyT(func(v *LandingZone) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   252  }
   253  
   254  // A map of tags assigned to the landing zone, including those inherited from the provider `defaultTags` configuration block.
   255  //
   256  // Deprecated: Please use `tags` instead.
   257  func (o LandingZoneOutput) TagsAll() pulumi.StringMapOutput {
   258  	return o.ApplyT(func(v *LandingZone) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   259  }
   260  
   261  // The landing zone version.
   262  func (o LandingZoneOutput) Version() pulumi.StringOutput {
   263  	return o.ApplyT(func(v *LandingZone) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
   264  }
   265  
   266  type LandingZoneArrayOutput struct{ *pulumi.OutputState }
   267  
   268  func (LandingZoneArrayOutput) ElementType() reflect.Type {
   269  	return reflect.TypeOf((*[]*LandingZone)(nil)).Elem()
   270  }
   271  
   272  func (o LandingZoneArrayOutput) ToLandingZoneArrayOutput() LandingZoneArrayOutput {
   273  	return o
   274  }
   275  
   276  func (o LandingZoneArrayOutput) ToLandingZoneArrayOutputWithContext(ctx context.Context) LandingZoneArrayOutput {
   277  	return o
   278  }
   279  
   280  func (o LandingZoneArrayOutput) Index(i pulumi.IntInput) LandingZoneOutput {
   281  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LandingZone {
   282  		return vs[0].([]*LandingZone)[vs[1].(int)]
   283  	}).(LandingZoneOutput)
   284  }
   285  
   286  type LandingZoneMapOutput struct{ *pulumi.OutputState }
   287  
   288  func (LandingZoneMapOutput) ElementType() reflect.Type {
   289  	return reflect.TypeOf((*map[string]*LandingZone)(nil)).Elem()
   290  }
   291  
   292  func (o LandingZoneMapOutput) ToLandingZoneMapOutput() LandingZoneMapOutput {
   293  	return o
   294  }
   295  
   296  func (o LandingZoneMapOutput) ToLandingZoneMapOutputWithContext(ctx context.Context) LandingZoneMapOutput {
   297  	return o
   298  }
   299  
   300  func (o LandingZoneMapOutput) MapIndex(k pulumi.StringInput) LandingZoneOutput {
   301  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LandingZone {
   302  		return vs[0].(map[string]*LandingZone)[vs[1].(string)]
   303  	}).(LandingZoneOutput)
   304  }
   305  
   306  func init() {
   307  	pulumi.RegisterInputType(reflect.TypeOf((*LandingZoneInput)(nil)).Elem(), &LandingZone{})
   308  	pulumi.RegisterInputType(reflect.TypeOf((*LandingZoneArrayInput)(nil)).Elem(), LandingZoneArray{})
   309  	pulumi.RegisterInputType(reflect.TypeOf((*LandingZoneMapInput)(nil)).Elem(), LandingZoneMap{})
   310  	pulumi.RegisterOutputType(LandingZoneOutput{})
   311  	pulumi.RegisterOutputType(LandingZoneArrayOutput{})
   312  	pulumi.RegisterOutputType(LandingZoneMapOutput{})
   313  }