Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion internal/stackql/dependencyplanner/dependencyplanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,18 @@ func (dp *standardDependencyPlanner) processAcquire(
return anTab, dp.tcc, nil
}

func (dp *standardDependencyPlanner) isVectorParam(param interface{}) bool {
paramMeta, isParamMeta := param.(parserutil.ParameterMetadata)
if isParamMeta {
val := paramMeta.GetVal()
_, valIsSQLVal := val.(sqlparser.ValTuple)
if valIsSQLVal {
return true
}
}
return false
}

//nolint:gocognit,nestif // live with it
func (dp *standardDependencyPlanner) getStreamFromEdge(
e dataflow.Edge,
Expand Down Expand Up @@ -639,7 +651,8 @@ func (dp *standardDependencyPlanner) getStreamFromEdge(
params := toAc.GetParameters()
staticParams := make(map[string]interface{})
for k, v := range params {
if _, ok := incomingCols[k]; !ok {
isVector := dp.isVectorParam(v)
if _, ok := incomingCols[k]; !ok && !isVector {
staticParams[k] = v
incomingCols[k] = struct{}{}
}
Expand Down
40 changes: 35 additions & 5 deletions internal/stackql/router/parameter_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ func (sp *standardParamSplitter) assembleSplitParams(
combinations := combinationComposerObj.getCombinations()
_, isAnythingSplit := len(combinations), combinationComposerObj.getIsAnythingSplit()
for _, paramCombination := range combinations {
com := paramCombination
splitAnnotationCtx := taxonomy.NewStaticStandardAnnotationCtx(
rawAnnotationCtx.GetSchema(),
rawAnnotationCtx.GetHIDs(),
rawAnnotationCtx.GetTableMeta().Clone(),
paramCombination,
com,
)
sp.splitAnnotationContextMap.Put(rawAnnotationCtx, splitAnnotationCtx)
// TODO: this has gotta replace the original and also be duplicated
Expand Down Expand Up @@ -288,7 +289,7 @@ func (sp *standardParamSplitter) splitSingleParam(
return rv, isSplit
}

//nolint:funlen,gocognit // inherently complex functionality
//nolint:funlen,gocognit,nestif // inherently complex functionality
func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collection, error) {
paramSplitterObj := newParamSplitter(pr.tableToAnnotationCtx, pr.dataFlowCfg)
isInitiallySplit, splitErr := paramSplitterObj.split()
Expand All @@ -310,6 +311,8 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
}
var dependencyTable sqlparser.TableExpr
var dependencies []taxonomy.AnnotationCtx
var destinations []taxonomy.AnnotationCtx

var destColumn *sqlparser.ColName
var srcExpr sqlparser.Expr
switch l := k.Left.(type) {
Expand All @@ -329,6 +332,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
} else {
dependencies = append(dependencies, lhr)
}
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
if isDestinationSplit {
destinations = append(destinations, splitDestinations...)
} else {
destinations = append(destinations, destHierarchy)
}
dependencyTable = candidateTable
srcExpr = k.Left
}
Expand All @@ -343,6 +352,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
} else {
dependencies = append(dependencies, annCtx)
}
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
if isDestinationSplit {
destinations = append(destinations, splitDestinations...)
} else {
destinations = append(destinations, destHierarchy)
}
dependencyTable = te
}
switch r := k.Right.(type) {
Expand All @@ -368,6 +383,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
} else {
dependencies = append(dependencies, rhr)
}
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
if isDestinationSplit {
destinations = append(destinations, splitDestinations...)
} else {
destinations = append(destinations, destHierarchy)
}
dependencyTable = candidateTable
}
case *sqlparser.FuncExpr:
Expand All @@ -381,16 +402,25 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
} else {
dependencies = append(dependencies, annCtx)
}
splitDestinations, isDestinationSplit := splitAnnotationContextMap.Get(destHierarchy)
if isDestinationSplit {
destinations = append(destinations, splitDestinations...)
} else {
destinations = append(destinations, destHierarchy)
}
dependencyTable = te
}
if !selfTableCited {
return nil, fmt.Errorf("table join ON comparison '%s' referencing incomplete", sqlparser.String(k))
}
// rv[dependencies] = destHierarchy

for _, dependency := range dependencies {
for i, dependency := range dependencies {
srcVertex := rv.UpsertStandardDataFlowVertex(dependency, dependencyTable)
destVertex := rv.UpsertStandardDataFlowVertex(destHierarchy, destinationTable)
destination := destHierarchy
if i < len(destinations) {
destination = destinations[i]
}
destVertex := rv.UpsertStandardDataFlowVertex(destination, destinationTable)

err := rv.AddOrUpdateEdge(
srcVertex,
Expand Down
4 changes: 2 additions & 2 deletions internal/stackql/sql_system/sql/sqlite/sqlengine-setup.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ VALUES (
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.BlockPublicAcls'') = 0, ''false'', ''true'') as BlockPublicAcls,
IIF(JSON_EXTRACT(Properties, ''$.PublicAccessBlockConfiguration.IgnorePublicAcls'') = 0, ''false'', ''true'') as IgnorePublicAcls,
JSON_EXTRACT(Properties, ''$.Tags'') as Tags
FROM aws.cloud_control.resources WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket'' and data__Identifier = ''stackql-trial-bucket-01''
FROM aws.cloud_control.resource WHERE region = ''ap-southeast-2'' and data__TypeName = ''AWS::S3::Bucket'' and data__Identifier = ''stackql-trial-bucket-01''
;'
);

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

Expand Down
7 changes: 6 additions & 1 deletion test/python/flask/aws/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def match_route(self, req: Request) -> dict:
config_path = os.path.join(os.path.dirname(__file__), "root_path_cfg.json")
cfg_obj: GetMatcherConfig = GetMatcherConfig()

def _extract_request_region(request: Request) -> str:
auth_header = request.headers.get("Authorization", "")
return '' if len(auth_header.split('/')) < 3 else auth_header.split('/')[2]

# Routes generated from mockserver configuration
@app.route('/', methods=['POST', "GET"])
def handle_root_requests():
Expand All @@ -228,7 +232,8 @@ def generic_handler(request: Request):
return jsonify({'error': f'Missing template for route: {request}'}), 500
logger.info(f"routing to template: {route_cfg['template']}")
twelve_days_ago = (datetime.datetime.now() - datetime.timedelta(days=12)).strftime("%Y-%m-%d")
response = make_response(render_template(route_cfg["template"], request=request, twelve_days_ago=twelve_days_ago))
region = _extract_request_region(request)
response = make_response(render_template(route_cfg["template"], request=request, region=region, twelve_days_ago=twelve_days_ago))
response.headers.update(route_cfg.get("response_headers", {}))
response.status_code = route_cfg.get("status", 200)
return response
Expand Down
48 changes: 48 additions & 0 deletions test/python/flask/aws/root_path_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,54 @@
"Content-Type": ["application/x-amz-json-1.0"]
}
},
"POST:/:newkey": {
"method": "POST",
"path": "/",
"headers": {
"Authorization": [
"^.*SignedHeaders=accept;content-type;host;x-amz-date;x-amz-target.*$"
],
"X-Amz-Target": [
"CloudApiService.ListResources"
]
},
"body_conditions": {
"type": "JSON",
"json": {
"TypeName": "AWS::EC2::Instance"
},
"matchType": "ONLY_MATCHING_FIELDS"
},
"template": "cloud_control_ec2_instances_list.jinja.json",
"status": 200,
"response_headers": {
"Content-Type": ["application/x-amz-json-1.0"]
}
},
"POST:/:newkey2": {
"method": "POST",
"path": "/",
"headers": {
"Authorization": [
"^.*SignedHeaders=.*content-type;host;x-amz-date;x-amz-target.*$"
],
"X-Amz-Target": [
"CloudApiService.GetResource"
]
},
"body_conditions": {
"type": "JSON",
"json": {
"TypeName": "AWS::EC2::Instance"
},
"matchType": "ONLY_MATCHING_FIELDS"
},
"template": "cloud_control_ec2_instance_detail.jinja.json",
"status": 200,
"response_headers": {
"Content-Type": ["application/x-amz-json-1.0"]
}
},
"POST:/:20": {
"method": "POST",
"path": "/",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ResourceDescription": {
"Identifier": "{{ request.json['Identifier'] }}",
"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\"}}"
},
"TypeName": "AWS::EC2::Instance"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"ResourceDescriptions": [
{% if region == 'ap-southeast-2' %}
{
"Identifier": "i-00000000000000001",
"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\"}}"
},
{
"Identifier": "i-00000000000000002",
"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\"}}"
},
{
"Identifier": "i-00000000000000003",
"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\"}}"
}
{% elif region == 'us-east-1' %}
{
"Identifier": "i-00000000000000004",
"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\"}}"
}
{% endif %}
],
"TypeName": "AWS::EC2::Instance"
}
10 changes: 9 additions & 1 deletion test/registry/src/aws/v0.1.0/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ providerServices:
$ref: aws/v0.1.0/services/cloud_control.yaml
title: Cloud Control API
version: v0.1.0
cloud_control_legacy:
description: cloud_control_legacy
id: cloud_control_legacy:v0.1.0
name: cloud_control_legacy
preferred: true
service:
$ref: aws/v0.1.0/services/cloud_control_legacy.yaml
title: Cloud Control Legacy API
version: v0.1.0
cloudhsm:
description: cloud_hsm
id: cloud_hsm:v2.0.0
Expand Down Expand Up @@ -55,7 +64,6 @@ providerServices:
service:
$ref: aws/v0.1.0/services/ec2_nextgen.yaml
title: EC2 NextGen
version: v0.1.0
iam:
description: iam
id: iam:v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion test/registry/src/aws/v0.1.0/services/acmpca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ components:
JSON_EXTRACT(Properties, '$.CertificateChain') as certificate_chain,
JSON_EXTRACT(Properties, '$.Status') as status,
JSON_EXTRACT(Properties, '$.CompleteCertificateChain') as complete_certificate_chain
FROM aws.cloud_control.resources WHERE data__TypeName = 'AWS::ACMPCA::CertificateAuthorityActivation'
FROM aws.cloud_control.resource WHERE data__TypeName = 'AWS::ACMPCA::CertificateAuthorityActivation'
AND data__Identifier = '<CertificateAuthorityArn>'
AND region = 'us-east-1'
fallback:
Expand Down
Loading
Loading