Comments (2)
I am also facing the same issue, the tag filter does not seem to work. It returns all the resources, despite passing the tag. I have double checked the tag key name and its value. Here is my output:
terracognita aws --aws-profile default --module route53record --tags Name:wwwpoc.net --tfstate terraform.tfstate --aws-default-region us-east-1
We are about to remove all content from "route53record", are you sure? Yes/No (Y/N):
Y
Starting Terracognita with version v0.8.4
Importing with filters:
Tags: [{Name wwwpoc.net}],
Include: [],
Exclude: [],
Targets: [],
Importing aws_alb_target_group [5/5] Done!
Importing aws_api_gateway_deployment [55/83]^C
If I try to include a certain resource type along with the tags, it says importing 31 resources but gives an empty state file like so:
$ terracognita aws --aws-profile default --module route53record --tags Name:wwwpoc.net --tfstate terraform.tfstate --aws-default-region us-east-1 --include aws_route53_record
We are about to remove all content from "route53record", are you sure? Yes/No (Y/N):
Y
Starting Terracognita with version v0.8.4
Importing with filters:
Tags: [{Name wwwpoc.net}],
Include: [aws_route53_record],
Exclude: [],
Targets: [],
Importing aws_route53_record [31/31] Done!
Writing HCL Done!
Writing TFState Done!
sh-4.2$ cat terraform.tfstate
{
"version": 4,
"terraform_version": "1.1.9",
"serial": 0,
"lineage": "e0041f14-403e-ee66-132a-2a99897dd5be",
"outputs": {},
"resources": []
}
from terracognita.
I think it works as intended, just the output is misleading, eg. for lambda, where only one of 32 functions has tag clickops:yes
.
terracognita aws --include aws_lambda_function --tfstate temp.json --hcl lambda_generated --tags 'clickops:yes'
terracognita aws --include aws_lambda_function --hcl lambda_generated --tags 'clickops:yes' --tfstate temp.json
We are about to remove all content from "lambda_generated", are you sure? Yes/No (Y/N):
y
Starting Terracognita with version v0.8.4
Importing with filters:
Tags: [{clickops yes}],
Include: [aws_lambda_function],
Exclude: [],
Targets: [],
Importing aws_lambda_function [32/32] Done!
Writing HCL Done!
cat temp.json | jq .resources | jq length
1
grep resource lambda_generated/*.hcl | wc -l
1
from terracognita.
Related Issues (20)
- `aws_s3_bucket`: Value for unconfigurable attribute `arn` and `hosted_zone_id` HOT 2
- Error: Cycle
- Add azure resources
- Some wrong tag with `3.9.0-cy` HOT 1
- Modifying variable output name? HOT 1
- azurerm: add azurerm_network_interface_security_group_association
- When upgrading the providers set the new version to the code
- azurerm_account_storage should be resource_group scoped
- OpenTofu support HOT 1
- -e --exclude does not exclude resources HOT 1
- route table association
- azure dnsZones expected, api returning dnszones HOT 1
- The `--version` option is missing
- The `--aws-profile` option doesn't actually exist HOT 1
- AzureRM goverment environment
- Bump AWS provider to 5.35.0, enable use of new S3 options (aws_s3_*) and additional VPC/security group breakouts
- Add cli flag to discover AWS credentials via AWS SDK default credential chain HOT 1
- Upgrade to aws-sdk-go-v2
- Documentation mistake in CONTRIBUTING.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terracognita.