File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -3294,6 +3294,12 @@ func run(cmd *cobra.Command, _ []string) {
3294
3294
clusterConfig .SharedVPCRoleArn = sharedVPCRoleARN
3295
3295
clusterConfig .BaseDomain = baseDomain
3296
3296
}
3297
+ if isHcpSharedVpc {
3298
+ clusterConfig .PrivateHostedZoneID = privateHostedZoneID
3299
+ clusterConfig .SharedVPCRoleArn = sharedVPCRoleARN
3300
+ clusterConfig .InternalCommunicationHostedZoneId = hcpInternalCommunicationHostedZoneId
3301
+ clusterConfig .VpcEndpointRoleArn = vpcEndpointRoleArn
3302
+ }
3297
3303
if clusterAutoscaler != nil {
3298
3304
autoscalerConfig , err := clusterautoscaler .CreateAutoscalerConfig (clusterAutoscaler )
3299
3305
if err != nil {
Original file line number Diff line number Diff line change @@ -166,6 +166,10 @@ type Spec struct {
166
166
SharedVPCRoleArn string
167
167
BaseDomain string
168
168
169
+ // HCP Shared VPC
170
+ VpcEndpointRoleArn string
171
+ InternalCommunicationHostedZoneId string
172
+
169
173
// Worker Machine Pool attributes
170
174
AdditionalComputeSecurityGroupIds []string
171
175
@@ -1012,6 +1016,13 @@ func (c *Client) createClusterSpec(config Spec) (*cmv1.Cluster, error) {
1012
1016
awsBuilder = awsBuilder .PrivateHostedZoneID (config .PrivateHostedZoneID )
1013
1017
awsBuilder = awsBuilder .PrivateHostedZoneRoleARN (config .SharedVPCRoleArn )
1014
1018
}
1019
+ // hcp shared vpc
1020
+ if config .VpcEndpointRoleArn != "" {
1021
+ awsBuilder = awsBuilder .PrivateHostedZoneID (config .PrivateHostedZoneID )
1022
+ awsBuilder = awsBuilder .PrivateHostedZoneRoleARN (config .SharedVPCRoleArn )
1023
+ awsBuilder = awsBuilder .VpcEndpointRoleArn (config .VpcEndpointRoleArn )
1024
+ awsBuilder = awsBuilder .HcpInternalCommunicationHostedZoneId (config .InternalCommunicationHostedZoneId )
1025
+ }
1015
1026
if config .BaseDomain != "" {
1016
1027
clusterBuilder = clusterBuilder .DNS (v1 .NewDNS ().BaseDomain (config .BaseDomain ))
1017
1028
}
You can’t perform that action at this time.
0 commit comments