Skip to content

Commit 912e485

Browse files
view-tuple-overwrite (#499)
Summary: - Support for tuple overwrite in views. - **ONLY** support for tuple overwriting tuple; **not** tuple overwriting scalar. - **ONLY** works for `INNER JOIN` views; avoid `OUTER JOIN`. - Updated version of `aws.cloud_control` incorporated into test suite. - Added robot test `View Tuple Replacement Working As Exemplified by AWS EC2 Instances List and Detail`.
1 parent 309d9ac commit 912e485

File tree

16 files changed

+1296
-72
lines changed

16 files changed

+1296
-72
lines changed

internal/stackql/dependencyplanner/dependencyplanner.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,18 @@ func (dp *standardDependencyPlanner) processAcquire(
586586
return anTab, dp.tcc, nil
587587
}
588588

589+
func (dp *standardDependencyPlanner) isVectorParam(param interface{}) bool {
590+
paramMeta, isParamMeta := param.(parserutil.ParameterMetadata)
591+
if isParamMeta {
592+
val := paramMeta.GetVal()
593+
_, valIsSQLVal := val.(sqlparser.ValTuple)
594+
if valIsSQLVal {
595+
return true
596+
}
597+
}
598+
return false
599+
}
600+
589601
//nolint:gocognit,nestif // live with it
590602
func (dp *standardDependencyPlanner) getStreamFromEdge(
591603
e dataflow.Edge,
@@ -639,7 +651,8 @@ func (dp *standardDependencyPlanner) getStreamFromEdge(
639651
params := toAc.GetParameters()
640652
staticParams := make(map[string]interface{})
641653
for k, v := range params {
642-
if _, ok := incomingCols[k]; !ok {
654+
isVector := dp.isVectorParam(v)
655+
if _, ok := incomingCols[k]; !ok && !isVector {
643656
staticParams[k] = v
644657
incomingCols[k] = struct{}{}
645658
}

internal/stackql/router/parameter_router.go

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,12 @@ func (sp *standardParamSplitter) assembleSplitParams(
250250
combinations := combinationComposerObj.getCombinations()
251251
_, isAnythingSplit := len(combinations), combinationComposerObj.getIsAnythingSplit()
252252
for _, paramCombination := range combinations {
253+
com := paramCombination
253254
splitAnnotationCtx := taxonomy.NewStaticStandardAnnotationCtx(
254255
rawAnnotationCtx.GetSchema(),
255256
rawAnnotationCtx.GetHIDs(),
256257
rawAnnotationCtx.GetTableMeta().Clone(),
257-
paramCombination,
258+
com,
258259
)
259260
sp.splitAnnotationContextMap.Put(rawAnnotationCtx, splitAnnotationCtx)
260261
// TODO: this has gotta replace the original and also be duplicated
@@ -288,7 +289,7 @@ func (sp *standardParamSplitter) splitSingleParam(
288289
return rv, isSplit
289290
}
290291

291-
//nolint:funlen,gocognit // inherently complex functionality
292+
//nolint:funlen,gocognit,nestif // inherently complex functionality
292293
func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collection, error) {
293294
paramSplitterObj := newParamSplitter(pr.tableToAnnotationCtx, pr.dataFlowCfg)
294295
isInitiallySplit, splitErr := paramSplitterObj.split()
@@ -310,6 +311,8 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
310311
}
311312
var dependencyTable sqlparser.TableExpr
312313
var dependencies []taxonomy.AnnotationCtx
314+
var destinations []taxonomy.AnnotationCtx
315+
313316
var destColumn *sqlparser.ColName
314317
var srcExpr sqlparser.Expr
315318
switch l := k.Left.(type) {
@@ -329,6 +332,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
329332
} else {
330333
dependencies = append(dependencies, lhr)
331334
}
335+
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
336+
if isDestinationSplit {
337+
destinations = append(destinations, splitDestinations...)
338+
} else {
339+
destinations = append(destinations, destHierarchy)
340+
}
332341
dependencyTable = candidateTable
333342
srcExpr = k.Left
334343
}
@@ -343,6 +352,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
343352
} else {
344353
dependencies = append(dependencies, annCtx)
345354
}
355+
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
356+
if isDestinationSplit {
357+
destinations = append(destinations, splitDestinations...)
358+
} else {
359+
destinations = append(destinations, destHierarchy)
360+
}
346361
dependencyTable = te
347362
}
348363
switch r := k.Right.(type) {
@@ -368,6 +383,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
368383
} else {
369384
dependencies = append(dependencies, rhr)
370385
}
386+
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
387+
if isDestinationSplit {
388+
destinations = append(destinations, splitDestinations...)
389+
} else {
390+
destinations = append(destinations, destHierarchy)
391+
}
371392
dependencyTable = candidateTable
372393
}
373394
case *sqlparser.FuncExpr:
@@ -381,16 +402,25 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
381402
} else {
382403
dependencies = append(dependencies, annCtx)
383404
}
405+
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
406+
if isDestinationSplit {
407+
destinations = append(destinations, splitDestinations...)
408+
} else {
409+
destinations = append(destinations, destHierarchy)
410+
}
384411
dependencyTable = te
385412
}
386413
if !selfTableCited {
387414
return nil, fmt.Errorf("table join ON comparison '%s' referencing incomplete", sqlparser.String(k))
388415
}
389-
// rv[dependencies] = destHierarchy
390416

391-
for _, dependency := range dependencies {
417+
for i, dependency := range dependencies {
392418
srcVertex := rv.UpsertStandardDataFlowVertex(dependency, dependencyTable)
393-
destVertex := rv.UpsertStandardDataFlowVertex(destHierarchy, destinationTable)
419+
destination := destHierarchy
420+
if i < len(destinations) {
421+
destination = destinations[i]
422+
}
423+
destVertex := rv.UpsertStandardDataFlowVertex(destination, destinationTable)
394424

395425
err := rv.AddOrUpdateEdge(
396426
srcVertex,

internal/stackql/sql_system/sql/sqlite/sqlengine-setup.ddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ VALUES (
267267
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.BlockPublicAcls'') = 0, ''false'', ''true'') as BlockPublicAcls,
268268
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.IgnorePublicAcls'') = 0, ''false'', ''true'') as IgnorePublicAcls,
269269
JSON_EXTRACT(Properties, ''$.Tags'') as Tags
270-
FROM aws.cloud_control.resources WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket'' and data__Identifier = ''stackql-trial-bucket-01''
270+
FROM aws.cloud_control.resource WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket'' and data__Identifier = ''stackql-trial-bucket-01''
271271
;'
272272
);
273273

@@ -291,7 +291,7 @@ VALUES (
291291
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.BlockPublicAcls'') = 0, ''false'', ''true'') as BlockPublicAcls,
292292
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.IgnorePublicAcls'') = 0, ''false'', ''true'') as IgnorePublicAcls,
293293
JSON_EXTRACT(Properties, ''$.Tags'') as Tags
294-
FROM aws.cloud_control.resources WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket''
294+
FROM aws.cloud_control_legacy.resources WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket''
295295
;'
296296
);
297297

test/python/flask/aws/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def match_route(self, req: Request) -> dict:
207207
config_path = os.path.join(os.path.dirname(__file__), "root_path_cfg.json")
208208
cfg_obj: GetMatcherConfig = GetMatcherConfig()
209209

210+
def _extract_request_region(request: Request) -> str:
211+
auth_header = request.headers.get("Authorization", "")
212+
return '' if len(auth_header.split('/')) < 3 else auth_header.split('/')[2]
213+
210214
# Routes generated from mockserver configuration
211215
@app.route('/', methods=['POST', "GET"])
212216
def handle_root_requests():
@@ -228,7 +232,8 @@ def generic_handler(request: Request):
228232
return jsonify({'error': f'Missing template for route: {request}'}), 500
229233
logger.info(f"routing to template: {route_cfg['template']}")
230234
twelve_days_ago = (datetime.datetime.now() - datetime.timedelta(days=12)).strftime("%Y-%m-%d")
231-
response = make_response(render_template(route_cfg["template"], request=request, twelve_days_ago=twelve_days_ago))
235+
region = _extract_request_region(request)
236+
response = make_response(render_template(route_cfg["template"], request=request, region=region, twelve_days_ago=twelve_days_ago))
232237
response.headers.update(route_cfg.get("response_headers", {}))
233238
response.status_code = route_cfg.get("status", 200)
234239
return response

test/python/flask/aws/root_path_cfg.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,54 @@
442442
"Content-Type": ["application/x-amz-json-1.0"]
443443
}
444444
},
445+
"POST:/:newkey": {
446+
"method": "POST",
447+
"path": "/",
448+
"headers": {
449+
"Authorization": [
450+
"^.*SignedHeaders=accept;content-type;host;x-amz-date;x-amz-target.*$"
451+
],
452+
"X-Amz-Target": [
453+
"CloudApiService.ListResources"
454+
]
455+
},
456+
"body_conditions": {
457+
"type": "JSON",
458+
"json": {
459+
"TypeName": "AWS::EC2::Instance"
460+
},
461+
"matchType": "ONLY_MATCHING_FIELDS"
462+
},
463+
"template": "cloud_control_ec2_instances_list.jinja.json",
464+
"status": 200,
465+
"response_headers": {
466+
"Content-Type": ["application/x-amz-json-1.0"]
467+
}
468+
},
469+
"POST:/:newkey2": {
470+
"method": "POST",
471+
"path": "/",
472+
"headers": {
473+
"Authorization": [
474+
"^.*SignedHeaders=.*content-type;host;x-amz-date;x-amz-target.*$"
475+
],
476+
"X-Amz-Target": [
477+
"CloudApiService.GetResource"
478+
]
479+
},
480+
"body_conditions": {
481+
"type": "JSON",
482+
"json": {
483+
"TypeName": "AWS::EC2::Instance"
484+
},
485+
"matchType": "ONLY_MATCHING_FIELDS"
486+
},
487+
"template": "cloud_control_ec2_instance_detail.jinja.json",
488+
"status": 200,
489+
"response_headers": {
490+
"Content-Type": ["application/x-amz-json-1.0"]
491+
}
492+
},
445493
"POST:/:20": {
446494
"method": "POST",
447495
"path": "/",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ResourceDescription": {
3+
"Identifier": "{{ request.json['Identifier'] }}",
4+
"Properties": "{\"Tenancy\":\"default\",\"SecurityGroups\":[\"aws-stack-dev-web-sg\"],\"PrivateDnsName\":\"ip-10-2-1-156.ap-southeast-2.compute.internal\",\"PrivateIpAddress\":\"10.2.1.156\",\"UserData\":\"\",\"BlockDeviceMappings\":[{\"Ebs\":{\"SnapshotId\":\"snap-0000000000000007\",\"VolumeType\":\"gp3\",\"Encrypted\":false,\"Iops\":3000,\"VolumeSize\":8,\"DeleteOnTermination\":true},\"DeviceName\":\"/dev/xvda\"}],\"SubnetId\":\"subnet-05a763b1b39acc6fe\",\"EbsOptimized\":false,\"Volumes\":[{\"VolumeId\":\"vol-0000000000000008\",\"Device\":\"/dev/xvda\"}],\"PrivateIp\":\"10.2.1.156\",\"EnclaveOptions\":{\"Enabled\":false},\"NetworkInterfaces\":[{\"AssociateCarrierIpAddress\":false,\"PrivateIpAddress\":\"10.2.1.156\",\"PrivateIpAddresses\":[{\"PrivateIpAddress\":\"10.2.1.156\",\"Primary\":true}],\"SecondaryPrivateIpAddressCount\":0,\"DeviceIndex\":\"0\",\"Ipv6AddressCount\":0,\"GroupSet\":[\"sg-000000000000005\"],\"Ipv6Addresses\":[],\"SubnetId\":\"subnet-05a763b1b39acc6fe\",\"AssociatePublicIpAddress\":true,\"NetworkInterfaceId\":\"eni-00000000000000006\",\"DeleteOnTermination\":true}],\"ImageId\":\"ami-030a5acd7c996ef60\",\"InstanceType\":\"t2.micro\",\"Monitoring\":false,\"Tags\":[{\"Value\":\"aws-stack\",\"Key\":\"StackName\"},{\"Value\":\"stackql\",\"Key\":\"Provisioner\"},{\"Value\":\"dev\",\"Key\":\"StackEnv\"},{\"Value\":\"aws-stack-dev-instance\",\"Key\":\"Name\"}],\"HibernationOptions\":{\"Configured\":false},\"InstanceId\":\"i-00000000000000003\",\"PublicIp\":\"13.211.134.69\",\"InstanceInitiatedShutdownBehavior\":\"stop\",\"CpuOptions\":{\"ThreadsPerCore\":1,\"CoreCount\":1},\"AvailabilityZone\":\"ap-southeast-2b\",\"PrivateDnsNameOptions\":{\"EnableResourceNameDnsARecord\":false,\"HostnameType\":\"ip-name\",\"EnableResourceNameDnsAAAARecord\":false},\"PublicDnsName\":\"ec2-13-211-134-69.ap-southeast-2.compute.amazonaws.com\",\"SecurityGroupIds\":[\"sg-000000000000005\"],\"DisableApiTermination\":false,\"SourceDestCheck\":true,\"PlacementGroupName\":\"\",\"VpcId\":\"vpc-00e086ac8c9504aec\",\"State\":{\"Code\":\"16\",\"Name\":\"running\"},\"CreditSpecification\":{\"CPUCredits\":\"standard\"}}"
5+
},
6+
"TypeName": "AWS::EC2::Instance"
7+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"ResourceDescriptions": [
3+
{% if region == 'ap-southeast-2' %}
4+
{
5+
"Identifier": "i-00000000000000001",
6+
"Properties": "{\"Tenancy\":\"default\",\"SecurityGroups\":[\"launch-wizard\"],\"PrivateDnsName\":\"ip-172-31-6-142.ap-southeast-2.compute.internal\",\"PrivateIpAddress\":\"172.31.6.142\",\"BlockDeviceMappings\":[],\"SubnetId\":\"subnet-0718009e7e2a0f750\",\"EbsOptimized\":false,\"Volumes\":[{\"VolumeId\":\"vol-0a06b014d09e72b0d\",\"Device\":\"/dev/xvda\"}],\"PrivateIp\":\"172.31.6.142\",\"EnclaveOptions\":{\"Enabled\":false},\"NetworkInterfaces\":[{\"AssociateCarrierIpAddress\":false,\"PrivateIpAddress\":\"172.31.6.142\",\"PrivateIpAddresses\":[{\"PrivateIpAddress\":\"172.31.6.142\",\"Primary\":true}],\"SecondaryPrivateIpAddressCount\":0,\"DeviceIndex\":\"0\",\"Ipv6AddressCount\":0,\"GroupSet\":[\"sg-07d3754577c36eeac\"],\"Ipv6Addresses\":[],\"SubnetId\":\"subnet-0718009e7e2a0f750\",\"AssociatePublicIpAddress\":true,\"NetworkInterfaceId\":\"eni-07c9c942f637281b9\",\"DeleteOnTermination\":true}],\"ImageId\":\"ami-0035ee596a0a12a7b\",\"InstanceType\":\"t2.nano\",\"Monitoring\":false,\"Tags\":[{\"Value\":\"Fred\",\"Key\":\"Test\"},{\"Value\":\"test\",\"Key\":\"Name\"}],\"HibernationOptions\":{\"Configured\":false},\"LicenseSpecifications\":[],\"InstanceId\":\"i-00000000000000001\",\"PublicIp\":\"13.211.203.69\",\"CpuOptions\":{\"ThreadsPerCore\":1,\"CoreCount\":1},\"AvailabilityZone\":\"ap-southeast-2b\",\"PrivateDnsNameOptions\":{\"EnableResourceNameDnsARecord\":false,\"HostnameType\":\"ip-name\",\"EnableResourceNameDnsAAAARecord\":false},\"PublicDnsName\":\"ec2-13-211-203-69.ap-southeast-2.compute.amazonaws.com\",\"SecurityGroupIds\":[\"sg-07d3754577c36eeac\"],\"KeyName\":\"stackql-test\",\"SourceDestCheck\":true,\"PlacementGroupName\":\"\",\"VpcId\":\"vpc-0343d19bfd304188e\",\"State\":{\"Code\":\"16\",\"Name\":\"running\"}}"
7+
},
8+
{
9+
"Identifier": "i-00000000000000002",
10+
"Properties": "{\"Tenancy\":\"default\",\"SecurityGroups\":[\"launch-wizard\"],\"PrivateDnsName\":\"ip-172-31-10-204.ap-southeast-2.compute.internal\",\"PrivateIpAddress\":\"172.31.10.204\",\"BlockDeviceMappings\":[],\"SubnetId\":\"subnet-0718009e7e2a0f750\",\"EbsOptimized\":false,\"Volumes\":[{\"VolumeId\":\"vol-09bbae22caf877d1e\",\"Device\":\"/dev/xvda\"}],\"PrivateIp\":\"172.31.10.204\",\"EnclaveOptions\":{\"Enabled\":false},\"NetworkInterfaces\":[{\"AssociateCarrierIpAddress\":false,\"PrivateIpAddress\":\"172.31.10.204\",\"PrivateIpAddresses\":[{\"PrivateIpAddress\":\"172.31.10.204\",\"Primary\":true}],\"SecondaryPrivateIpAddressCount\":0,\"DeviceIndex\":\"0\",\"Ipv6AddressCount\":0,\"GroupSet\":[\"sg-07d3754577c36eeac\"],\"Ipv6Addresses\":[],\"SubnetId\":\"subnet-0718009e7e2a0f750\",\"AssociatePublicIpAddress\":true,\"NetworkInterfaceId\":\"eni-08cab5f9ca9ea8b9d\",\"DeleteOnTermination\":true}],\"ImageId\":\"ami-0ec0514235185af79\",\"InstanceType\":\"t2.micro\",\"Monitoring\":false,\"Tags\":[{\"Value\":\"test1\",\"Key\":\"Name\"}],\"HibernationOptions\":{\"Configured\":false},\"LicenseSpecifications\":[],\"InstanceId\":\"i-00000000000000002\",\"PublicIp\":\"54.66.216.138\",\"CpuOptions\":{\"ThreadsPerCore\":1,\"CoreCount\":1},\"AvailabilityZone\":\"ap-southeast-2b\",\"PrivateDnsNameOptions\":{\"EnableResourceNameDnsARecord\":true,\"HostnameType\":\"ip-name\",\"EnableResourceNameDnsAAAARecord\":false},\"PublicDnsName\":\"ec2-54-66-216-138.ap-southeast-2.compute.amazonaws.com\",\"SecurityGroupIds\":[\"sg-07d3754577c36eeac\"],\"SourceDestCheck\":true,\"PlacementGroupName\":\"\",\"VpcId\":\"vpc-0343d19bfd304188e\",\"State\":{\"Code\":\"16\",\"Name\":\"running\"}}"
11+
},
12+
{
13+
"Identifier": "i-00000000000000003",
14+
"Properties": "{\"Tenancy\":\"default\",\"SecurityGroups\":[\"aws-stack-dev-web-sg\"],\"PrivateDnsName\":\"ip-10-2-1-156.ap-southeast-2.compute.internal\",\"PrivateIpAddress\":\"10.2.1.156\",\"BlockDeviceMappings\":[],\"SubnetId\":\"subnet-05a763b1b39acc6fe\",\"EbsOptimized\":false,\"Volumes\":[{\"VolumeId\":\"vol-0000000000000008\",\"Device\":\"/dev/xvda\"}],\"PrivateIp\":\"10.2.1.156\",\"EnclaveOptions\":{\"Enabled\":false},\"NetworkInterfaces\":[{\"AssociateCarrierIpAddress\":false,\"PrivateIpAddress\":\"10.2.1.156\",\"PrivateIpAddresses\":[{\"PrivateIpAddress\":\"10.2.1.156\",\"Primary\":true}],\"SecondaryPrivateIpAddressCount\":0,\"DeviceIndex\":\"0\",\"Ipv6AddressCount\":0,\"GroupSet\":[\"sg-000000000000005\"],\"Ipv6Addresses\":[],\"SubnetId\":\"subnet-05a763b1b39acc6fe\",\"AssociatePublicIpAddress\":true,\"NetworkInterfaceId\":\"eni-00000000000000006\",\"DeleteOnTermination\":true}],\"ImageId\":\"ami-030a5acd7c996ef60\",\"InstanceType\":\"t2.micro\",\"Monitoring\":false,\"Tags\":[{\"Value\":\"aws-stack\",\"Key\":\"StackName\"},{\"Value\":\"stackql\",\"Key\":\"Provisioner\"},{\"Value\":\"dev\",\"Key\":\"StackEnv\"},{\"Value\":\"aws-stack-dev-instance\",\"Key\":\"Name\"}],\"HibernationOptions\":{\"Configured\":false},\"LicenseSpecifications\":[],\"InstanceId\":\"i-00000000000000003\",\"PublicIp\":\"13.211.134.69\",\"CpuOptions\":{\"ThreadsPerCore\":1,\"CoreCount\":1},\"AvailabilityZone\":\"ap-southeast-2b\",\"PrivateDnsNameOptions\":{\"EnableResourceNameDnsARecord\":false,\"HostnameType\":\"ip-name\",\"EnableResourceNameDnsAAAARecord\":false},\"PublicDnsName\":\"ec2-13-211-134-69.ap-southeast-2.compute.amazonaws.com\",\"SecurityGroupIds\":[\"sg-000000000000005\"],\"SourceDestCheck\":true,\"PlacementGroupName\":\"\",\"VpcId\":\"vpc-00e086ac8c9504aec\",\"State\":{\"Code\":\"16\",\"Name\":\"running\"}}"
15+
}
16+
{% elif region == 'us-east-1' %}
17+
{
18+
"Identifier": "i-00000000000000004",
19+
"Properties": "{\"Tenancy\":\"default\",\"SecurityGroups\":[\"aws-stack-dev-web-sg\"],\"PrivateDnsName\":\"ip-10-2-1-199.ec2.internal\",\"PrivateIpAddress\":\"10.2.1.199\",\"BlockDeviceMappings\":[],\"SubnetId\":\"subnet-0e16ac880cb33918f\",\"EbsOptimized\":false,\"Volumes\":[{\"VolumeId\":\"vol-055d48a8b1a6259bf\",\"Device\":\"/dev/xvda\"}],\"PrivateIp\":\"10.2.1.199\",\"EnclaveOptions\":{\"Enabled\":false},\"NetworkInterfaces\":[{\"AssociateCarrierIpAddress\":false,\"PrivateIpAddress\":\"10.2.1.199\",\"PrivateIpAddresses\":[{\"PrivateIpAddress\":\"10.2.1.199\",\"Primary\":true}],\"SecondaryPrivateIpAddressCount\":0,\"DeviceIndex\":\"0\",\"Ipv6AddressCount\":0,\"GroupSet\":[\"sg-073ac14cc1a4ddfb0\"],\"Ipv6Addresses\":[],\"SubnetId\":\"subnet-0e16ac880cb33918f\",\"AssociatePublicIpAddress\":true,\"NetworkInterfaceId\":\"eni-04ad5c232cc4c4a2e\",\"DeleteOnTermination\":true}],\"ImageId\":\"ami-012967cc5a8c9f891\",\"InstanceType\":\"t2.micro\",\"Monitoring\":false,\"Tags\":[{\"Value\":\"aws-stack-dev-instance\",\"Key\":\"Name\"},{\"Value\":\"aws-stack\",\"Key\":\"StackName\"},{\"Value\":\"dev\",\"Key\":\"StackEnv\"},{\"Value\":\"stackql\",\"Key\":\"Provisioner\"}],\"HibernationOptions\":{\"Configured\":false},\"LicenseSpecifications\":[],\"InstanceId\":\"i-00000000000000004\",\"PublicIp\":\"18.234.253.185\",\"CpuOptions\":{\"ThreadsPerCore\":1,\"CoreCount\":1},\"AvailabilityZone\":\"us-east-1e\",\"PrivateDnsNameOptions\":{\"EnableResourceNameDnsARecord\":false,\"HostnameType\":\"ip-name\",\"EnableResourceNameDnsAAAARecord\":false},\"PublicDnsName\":\"ec2-18-234-253-185.compute-1.amazonaws.com\",\"SecurityGroupIds\":[\"sg-073ac14cc1a4ddfb0\"],\"SourceDestCheck\":true,\"PlacementGroupName\":\"\",\"VpcId\":\"vpc-0df79c273d7be8cce\",\"State\":{\"Code\":\"16\",\"Name\":\"running\"}}"
20+
}
21+
{% endif %}
22+
],
23+
"TypeName": "AWS::EC2::Instance"
24+
}

test/registry/src/aws/v0.1.0/provider.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ providerServices:
2020
$ref: aws/v0.1.0/services/cloud_control.yaml
2121
title: Cloud Control API
2222
version: v0.1.0
23+
cloud_control_legacy:
24+
description: cloud_control_legacy
25+
id: cloud_control_legacy:v0.1.0
26+
name: cloud_control_legacy
27+
preferred: true
28+
service:
29+
$ref: aws/v0.1.0/services/cloud_control_legacy.yaml
30+
title: Cloud Control Legacy API
31+
version: v0.1.0
2332
cloudhsm:
2433
description: cloud_hsm
2534
id: cloud_hsm:v2.0.0
@@ -55,7 +64,6 @@ providerServices:
5564
service:
5665
$ref: aws/v0.1.0/services/ec2_nextgen.yaml
5766
title: EC2 NextGen
58-
version: v0.1.0
5967
iam:
6068
description: iam
6169
id: iam:v0.1.0

test/registry/src/aws/v0.1.0/services/acmpca.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ components:
14861486
JSON_EXTRACT(Properties, '$.CertificateChain') as certificate_chain,
14871487
JSON_EXTRACT(Properties, '$.Status') as status,
14881488
JSON_EXTRACT(Properties, '$.CompleteCertificateChain') as complete_certificate_chain
1489-
FROM aws.cloud_control.resources WHERE data__TypeName = 'AWS::ACMPCA::CertificateAuthorityActivation'
1489+
FROM aws.cloud_control.resource WHERE data__TypeName = 'AWS::ACMPCA::CertificateAuthorityActivation'
14901490
AND data__Identifier = '<CertificateAuthorityArn>'
14911491
AND region = 'us-east-1'
14921492
fallback:

0 commit comments

Comments
 (0)