Skip to content

Commit 9c645b8

Browse files
committed
remove websites from resource index
1 parent ec10d1b commit 9c645b8

File tree

2 files changed

+18
-44
lines changed

2 files changed

+18
-44
lines changed

cloud/aws/common/index.go

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,27 @@ type Topic struct {
3232

3333
// ResourceIndex - The resource index for a nitric stack
3434
type ResourceIndex struct {
35-
Buckets map[string]AwsResourceArn `json:"buckets"`
36-
Topics map[string]Topic `json:"topics"`
37-
KvStores map[string]AwsResourceArn `json:"kvStores"`
38-
Queues map[string]AwsResourceArn `json:"queues"`
39-
Secrets map[string]AwsResourceArn `json:"secrets"`
40-
Apis map[string]ApiGateway `json:"apis"`
41-
HttpProxies map[string]ApiGateway `json:"httpProxies"`
42-
Websockets map[string]ApiGateway `json:"websockets"`
43-
Schedules map[string]AwsResourceArn `json:"schedules"`
44-
Distributions map[string]AwsResourceArn `json:"distributions"`
45-
WebsiteBuckets map[string]AwsResourceArn `json:"websiteBuckets"`
35+
Buckets map[string]AwsResourceArn `json:"buckets"`
36+
Topics map[string]Topic `json:"topics"`
37+
KvStores map[string]AwsResourceArn `json:"kvStores"`
38+
Queues map[string]AwsResourceArn `json:"queues"`
39+
Secrets map[string]AwsResourceArn `json:"secrets"`
40+
Apis map[string]ApiGateway `json:"apis"`
41+
HttpProxies map[string]ApiGateway `json:"httpProxies"`
42+
Websockets map[string]ApiGateway `json:"websockets"`
43+
Schedules map[string]AwsResourceArn `json:"schedules"`
4644
}
4745

4846
func NewResourceIndex() *ResourceIndex {
4947
return &ResourceIndex{
50-
Buckets: make(map[string]AwsResourceName),
51-
Topics: make(map[string]Topic),
52-
KvStores: make(map[string]AwsResourceArn),
53-
Queues: make(map[string]AwsResourceArn),
54-
Secrets: make(map[string]AwsResourceArn),
55-
Apis: make(map[string]ApiGateway),
56-
HttpProxies: make(map[string]ApiGateway),
57-
Websockets: make(map[string]ApiGateway),
58-
Schedules: make(map[string]AwsResourceArn),
59-
Distributions: make(map[string]AwsResourceArn),
60-
WebsiteBuckets: make(map[string]AwsResourceArn),
48+
Buckets: make(map[string]AwsResourceName),
49+
Topics: make(map[string]Topic),
50+
KvStores: make(map[string]AwsResourceArn),
51+
Queues: make(map[string]AwsResourceArn),
52+
Secrets: make(map[string]AwsResourceArn),
53+
Apis: make(map[string]ApiGateway),
54+
HttpProxies: make(map[string]ApiGateway),
55+
Websockets: make(map[string]ApiGateway),
56+
Schedules: make(map[string]AwsResourceArn),
6157
}
6258
}

cloud/aws/deploy/resources.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,6 @@ func (a *NitricAwsPulumiProvider) resourcesStore(ctx *pulumi.Context) error {
8383
httpProxyEndpointMap[name] = proxy.ApiEndpoint
8484
}
8585

86-
websiteBucketArnMap := pulumi.StringMap{}
87-
if a.publicWebsiteBucket != nil {
88-
websiteBucketArnMap[a.websiteBucketName] = a.publicWebsiteBucket.Arn
89-
}
90-
91-
distributionsArnMap := pulumi.StringMap{}
92-
for name, distribution := range a.Distributions {
93-
distributionsArnMap[name] = distribution.Arn
94-
}
95-
9686
// Build the index from the provider information
9787
resourceIndexJson := pulumi.All(
9888
bucketArnMap,
@@ -107,8 +97,6 @@ func (a *NitricAwsPulumiProvider) resourcesStore(ctx *pulumi.Context) error {
10797
stateMachArnMap,
10898
httpProxyArnMap,
10999
httpProxyEndpointMap,
110-
distributionsArnMap,
111-
websiteBucketArnMap,
112100
).ApplyT(func(args []interface{}) (string, error) {
113101
bucketNameMap := args[0].(map[string]string)
114102
apiArnMap := args[1].(map[string]string)
@@ -122,8 +110,6 @@ func (a *NitricAwsPulumiProvider) resourcesStore(ctx *pulumi.Context) error {
122110
stateMachArnMap := args[9].(map[string]string)
123111
httpProxyArnMap := args[10].(map[string]string)
124112
httpProxyEndpointMap := args[11].(map[string]string)
125-
distributionsArnMap := args[12].(map[string]string)
126-
websiteBucketArnMap := args[13].(map[string]string)
127113

128114
index := common.NewResourceIndex()
129115
for name, bucket := range bucketNameMap {
@@ -170,14 +156,6 @@ func (a *NitricAwsPulumiProvider) resourcesStore(ctx *pulumi.Context) error {
170156
index.Secrets[name] = arn
171157
}
172158

173-
for name, arn := range distributionsArnMap {
174-
index.Distributions[name] = arn
175-
}
176-
177-
for name, arn := range websiteBucketArnMap {
178-
index.WebsiteBuckets[name] = arn
179-
}
180-
181159
indexJson, err := json.Marshal(index)
182160
if err != nil {
183161
return "", err

0 commit comments

Comments
 (0)