-
Notifications
You must be signed in to change notification settings - Fork 17
/
awscdk_Environment.go
53 lines (50 loc) · 2.12 KB
/
awscdk_Environment.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
// An experiment to bundle the entire CDK into a single module
package awscdk
// The deployment environment for a stack.
//
// Example:
// // Passing a replication bucket created in a different stack.
// app := awscdk.NewApp()
// replicationStack := awscdk.Newstack(app, jsii.String("ReplicationStack"), &stackProps{
// env: &environment{
// region: jsii.String("us-west-1"),
// },
// })
// key := kms.NewKey(replicationStack, jsii.String("ReplicationKey"))
// replicationBucket := s3.NewBucket(replicationStack, jsii.String("ReplicationBucket"), &bucketProps{
// // like was said above - replication buckets need a set physical name
// bucketName: awscdk.PhysicalName_GENERATE_IF_NEEDED(),
// encryptionKey: key,
// })
//
// // later...
// // later...
// codepipeline.NewPipeline(replicationStack, jsii.String("Pipeline"), &pipelineProps{
// crossRegionReplicationBuckets: map[string]iBucket{
// "us-west-1": replicationBucket,
// },
// })
//
// Experimental.
type Environment struct {
// The AWS account ID for this environment.
//
// This can be either a concrete value such as `585191031104` or `Aws.accountId` which
// indicates that account ID will only be determined during deployment (it
// will resolve to the CloudFormation intrinsic `{"Ref":"AWS::AccountId"}`).
// Note that certain features, such as cross-stack references and
// environmental context providers require concerete region information and
// will cause this stack to emit synthesis errors.
// Experimental.
Account *string `field:"optional" json:"account" yaml:"account"`
// The AWS region for this environment.
//
// This can be either a concrete value such as `eu-west-2` or `Aws.region`
// which indicates that account ID will only be determined during deployment
// (it will resolve to the CloudFormation intrinsic `{"Ref":"AWS::Region"}`).
// Note that certain features, such as cross-stack references and
// environmental context providers require concerete region information and
// will cause this stack to emit synthesis errors.
// Experimental.
Region *string `field:"optional" json:"region" yaml:"region"`
}