Skip to content

Commit

Permalink
ci: localstack tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-svensson committed Jan 5, 2023
1 parent d276bc5 commit 600a6aa
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
os: [ ubuntu-latest ]
tf-version: [ 1.1.9, 1.2.9, 1.3.2 ]
steps:
- name: Start LocalStack
uses: HarshCasper/setup-localstack@v0.1.1
with:
image-tag: 'latest'

- name: Install terraform v${{ matrix.tf-version }}
run: |
curl -LO https://releases.hashicorp.com/terraform/${{ matrix.tf-version }}/terraform_${{ matrix.tf-version }}_linux_amd64.zip
Expand Down
41 changes: 29 additions & 12 deletions examples/basic/provider.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
provider "aws" {
skip_requesting_account_id = true
access_key = "test"
secret_key = "test"
region = "us-east-1"
s3_use_path_style = false
skip_credentials_validation = true
skip_metadata_api_check = true
s3_use_path_style = true
region = "eu-west-1"
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
skip_requesting_account_id = true

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
endpoints {
apigateway = "http://localhost:4566"
apigatewayv2 = "http://localhost:4566"
cloudformation = "http://localhost:4566"
cloudwatch = "http://localhost:4566"
dynamodb = "http://localhost:4566"
ec2 = "http://localhost:4566"
es = "http://localhost:4566"
elasticache = "http://localhost:4566"
firehose = "http://localhost:4566"
iam = "http://localhost:4566"
kinesis = "http://localhost:4566"
lambda = "http://localhost:4566"
rds = "http://localhost:4566"
redshift = "http://localhost:4566"
route53 = "http://localhost:4566"
s3 = "http://s3.localhost.localstack.cloud:4566"
secretsmanager = "http://localhost:4566"
ses = "http://localhost:4566"
sns = "http://localhost:4566"
sqs = "http://localhost:4566"
ssm = "http://localhost:4566"
stepfunctions = "http://localhost:4566"
sts = "http://localhost:4566"
}
}
41 changes: 29 additions & 12 deletions examples/override/provider.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
provider "aws" {
skip_requesting_account_id = true
access_key = "test"
secret_key = "test"
region = "us-east-1"
s3_use_path_style = false
skip_credentials_validation = true
skip_metadata_api_check = true
s3_use_path_style = true
region = "eu-west-1"
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
skip_requesting_account_id = true

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
endpoints {
apigateway = "http://localhost:4566"
apigatewayv2 = "http://localhost:4566"
cloudformation = "http://localhost:4566"
cloudwatch = "http://localhost:4566"
dynamodb = "http://localhost:4566"
ec2 = "http://localhost:4566"
es = "http://localhost:4566"
elasticache = "http://localhost:4566"
firehose = "http://localhost:4566"
iam = "http://localhost:4566"
kinesis = "http://localhost:4566"
lambda = "http://localhost:4566"
rds = "http://localhost:4566"
redshift = "http://localhost:4566"
route53 = "http://localhost:4566"
s3 = "http://s3.localhost.localstack.cloud:4566"
secretsmanager = "http://localhost:4566"
ses = "http://localhost:4566"
sns = "http://localhost:4566"
sqs = "http://localhost:4566"
ssm = "http://localhost:4566"
stepfunctions = "http://localhost:4566"
sts = "http://localhost:4566"
}
}
1 change: 1 addition & 0 deletions examples/public/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module "network" {
name = "name"
region = "eu-west-1"
public_subnet_zones = ["a", "b", "c"]
s3_service_endpoint = true
}
41 changes: 29 additions & 12 deletions examples/public/provider.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
provider "aws" {
skip_requesting_account_id = true
access_key = "test"
secret_key = "test"
region = "us-east-1"
s3_use_path_style = false
skip_credentials_validation = true
skip_metadata_api_check = true
s3_use_path_style = true
region = "eu-west-1"
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
skip_requesting_account_id = true

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
endpoints {
apigateway = "http://localhost:4566"
apigatewayv2 = "http://localhost:4566"
cloudformation = "http://localhost:4566"
cloudwatch = "http://localhost:4566"
dynamodb = "http://localhost:4566"
ec2 = "http://localhost:4566"
es = "http://localhost:4566"
elasticache = "http://localhost:4566"
firehose = "http://localhost:4566"
iam = "http://localhost:4566"
kinesis = "http://localhost:4566"
lambda = "http://localhost:4566"
rds = "http://localhost:4566"
redshift = "http://localhost:4566"
route53 = "http://localhost:4566"
s3 = "http://s3.localhost.localstack.cloud:4566"
secretsmanager = "http://localhost:4566"
ses = "http://localhost:4566"
sns = "http://localhost:4566"
sqs = "http://localhost:4566"
ssm = "http://localhost:4566"
stepfunctions = "http://localhost:4566"
sts = "http://localhost:4566"
}
}

0 comments on commit 600a6aa

Please sign in to comment.