Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"Bash(cargo tree:*)",
"Bash(where llvm-config:*)",
"Read(//c/msys64/mingw64/bin/**)",
"Read(//c/msys64/clang64/bin/**)"
"Read(//c/msys64/clang64/bin/**)",
"Bash(cargo doc:*)",
"Bash(grep -r impl.*Read.*for.*Response c:/LocalGitRepos/stackql/stackql-deploy-rs/target/doc/reqwest/blocking/struct.Response.html)"
]
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ Resource `.iql` files define mutation and check queries using SQL anchors:
```sql
/*+ create */
INSERT INTO azure.resources.resource_groups(
resourceGroupName, subscriptionId, data__location
resourceGroupName, subscriptionId, location
)
SELECT '{{ resource_group_name }}', '{{ subscription_id }}', '{{ location }}'

/*+ update */
UPDATE azure.resources.resource_groups
SET data__location = '{{ location }}'
SET location = '{{ location }}'
WHERE resourceGroupName = '{{ resource_group_name }}'
AND subscriptionId = '{{ subscription_id }}'

Expand Down
2 changes: 1 addition & 1 deletion examples/aws/aws-stack/resources/example_inet_gateway.iql
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ AND json_extract(tags, '$.StackEnv') = '{{ stack_env }}'

/*+ delete */
DELETE FROM aws.ec2.internet_gateways
WHERE data__Identifier = '{{ internet_gateway_id }}'
WHERE Identifier = '{{ internet_gateway_id }}'
AND region = '{{ region }}';
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ AND vpc_id = '{{ vpc_id }}'

/*+ delete */
DELETE FROM aws.ec2.vpc_gateway_attachments
WHERE data__Identifier = 'IGW|{{ vpc_id }}'
WHERE Identifier = 'IGW|{{ vpc_id }}'
AND region = '{{ region }}';
14 changes: 7 additions & 7 deletions examples/aws/aws-stack/resources/example_inet_route.iql
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*+ exists */
SELECT COUNT(*) as count FROM
(
SELECT data__Identifier
SELECT Identifier
FROM aws.ec2.routes
WHERE region = '{{ region }}'
AND data__Identifier = '{{ route_table_id }}|0.0.0.0/0'
AND Identifier = '{{ route_table_id }}|0.0.0.0/0'
) t;

/*+ create */
Expand All @@ -23,19 +23,19 @@ SELECT
/*+ statecheck, retries=5, retry_delay=5 */
SELECT COUNT(*) as count FROM
(
SELECT data__Identifier
SELECT Identifier
FROM aws.ec2.routes
WHERE region = '{{ region }}'
AND data__Identifier = '{{ route_table_id }}|0.0.0.0/0'
AND Identifier = '{{ route_table_id }}|0.0.0.0/0'
) t;

/*+ exports */
SELECT data__Identifier as inet_route_indentifer
SELECT Identifier as inet_route_indentifer
FROM aws.ec2.routes
WHERE region = '{{ region }}'
AND data__Identifier = '{{ route_table_id }}|0.0.0.0/0';
AND Identifier = '{{ route_table_id }}|0.0.0.0/0';

/*+ delete */
DELETE FROM aws.ec2.routes
WHERE data__Identifier = '{{ inet_route_indentifer }}'
WHERE Identifier = '{{ inet_route_indentifer }}'
AND region = '{{ region }}';
2 changes: 1 addition & 1 deletion examples/aws/aws-stack/resources/example_route_table.iql
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ AND json_extract(tags, '$.StackEnv') = '{{ stack_env }}'

/*+ delete */
DELETE FROM aws.ec2.route_tables
WHERE data__Identifier = '{{ route_table_id }}'
WHERE Identifier = '{{ route_table_id }}'
AND region = '{{ region }}';
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ AND json_extract(tags, '$.StackEnv') = '{{ stack_env }}'

/*+ delete */
DELETE FROM aws.ec2.security_groups
WHERE data__Identifier = '{{ security_group_id }}'
WHERE Identifier = '{{ security_group_id }}'
AND region = '{{ region }}';
2 changes: 1 addition & 1 deletion examples/aws/aws-stack/resources/example_subnet.iql
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ WHERE cidr_block = '{{ subnet_cidr_block }}';

/*+ delete */
DELETE FROM aws.ec2.subnets
WHERE data__Identifier = '{{ subnet_id }}'
WHERE Identifier = '{{ subnet_id }}'
AND region = '{{ region }}';
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ AND subnet_id = '{{ subnet_id }}';

/*+ delete */
DELETE FROM aws.ec2.subnet_route_table_associations
WHERE data__Identifier = '{{ route_table_assn_id }}'
WHERE Identifier = '{{ route_table_assn_id }}'
AND region = '{{ region }}';
2 changes: 1 addition & 1 deletion examples/aws/aws-stack/resources/example_vpc.iql
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ AND json_extract(tags, '$.StackEnv') = '{{ stack_env }}'

/*+ delete */
DELETE FROM aws.ec2.vpcs
WHERE data__Identifier = '{{ vpc_id }}'
WHERE Identifier = '{{ vpc_id }}'
AND region = '{{ region }}';
2 changes: 1 addition & 1 deletion examples/aws/aws-stack/resources/example_web_server.iql
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ AND json_extract(tags, '$.Name') = '{{ instance_name }}'

/*+ delete */
DELETE FROM aws.ec2.instances
WHERE data__Identifier = '{{ instance_id }}'
WHERE Identifier = '{{ instance_id }}'
AND region = '{{ region }}';
17 changes: 7 additions & 10 deletions examples/aws/aws-stack/stackql_manifest.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
#
# aws starter project manifest file, add and update values as needed
#
version: 1
name: "aws-stack"
description: description for "aws-stack"
name: "aws-vpc-webserver"
description: Provisions a complete AWS networking stack (VPC, subnet, internet gateway, route table, security group) with an Apache web server EC2 instance.
providers:
- aws
- awscc
globals:
- name: region
description: aws region
value: "{{ AWS_REGION }}"
- name: global_tags
value:
- Key: Provisioner
Value: stackql
- Key: StackName
- Key: 'stackql:stack-name'
Value: "{{ stack_name }}"
- Key: StackEnv
- Key: 'stackql:stack-env'
Value: "{{ stack_env }}"
- Key: 'stackql:resource-name'
Value: "{{ resource_name }}"
resources:
- name: example_vpc
props:
Expand Down
80 changes: 0 additions & 80 deletions examples/aws/patch-doc-test/README.md

This file was deleted.

54 changes: 0 additions & 54 deletions examples/aws/patch-doc-test/resources/bucket1.iql

This file was deleted.

34 changes: 0 additions & 34 deletions examples/aws/patch-doc-test/stackql_manifest.yml

This file was deleted.

6 changes: 3 additions & 3 deletions examples/azure/azure-stack/resources/example_nic.iql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ INSERT INTO azure.network.interfaces(
networkInterfaceName,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
data__tags
location,
properties,
tags
)
SELECT
'{{ nic_name }}',
Expand Down
6 changes: 3 additions & 3 deletions examples/azure/azure-stack/resources/example_nsg.iql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ INSERT INTO azure.network.security_groups(
networkSecurityGroupName,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
data__tags
location,
properties,
tags
)
SELECT
'{{ nsg_name }}',
Expand Down
6 changes: 3 additions & 3 deletions examples/azure/azure-stack/resources/example_public_ip.iql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ INSERT INTO azure.network.public_ip_addresses(
publicIpAddressName,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
data__tags
location,
properties,
tags
)
SELECT
'{{ public_ip_name }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ AND resourceGroupName = '{{ resource_group_name }}'
INSERT INTO azure.resources.resource_groups(
resourceGroupName,
subscriptionId,
data__location,
data__tags
location,
tags
)
SELECT
'{{ resource_group_name }}',
Expand Down
2 changes: 1 addition & 1 deletion examples/azure/azure-stack/resources/example_subnet.iql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ INSERT INTO azure.network.subnets(
virtualNetworkName,
resourceGroupName,
subscriptionId,
data__properties
properties
)
SELECT
'{{ subnet_name }}',
Expand Down
Loading
Loading