anyone else experiencing issues using `!terraform....
# atmos
j
anyone else experiencing issues using
!terraform.state
with mock outputs where it intermittently gives
null
value instead of using mock value?
for example:
Copy code
rds:
      settings:
        validation:
          validate-sqlserver-with-jsonschema:
            schema_type: jsonschema
            schema_path: "rds/sqlserver.json"
            description: Validate 'sqlserver' mixin variables using JSON Schema
      vars:
        defaults:
          domain_iam_role_name: !terraform.state iam-assumable-role "wrapper.rds-ad-auth.role_name // ""MOCK__role_name"""
          engine: sqlserver-se
          engine_version: 15.00
          family: sqlserver-se-15.0
          major_engine_version: 15.00
          port: 1433
          vpc_security_group_ids:
            - !terraform.state security-group "wrapper.sqlserver.security_group_id // ""MOCK__security_group_id"""
yields
Copy code
│ Error: Null value found in list
│ 
│   with module.wrapper["sqlserver"].module.db_instance.aws_db_instance.this[0],
│   on ../modules/db_instance/main.tf line 61, in resource "aws_db_instance" "this":
│   61:   vpc_security_group_ids = var.vpc_security_group_ids
│ 
│ Null values are not allowed for this attribute value.
if i rerun the pipeline enough times, it goes away
but i feel like this might be a bug - thoughts?
a
@Jonathan Rose did you run it locally? if you do, do yuo see the same issue?
j
yes
submit github issue?
a
yes please provide the stack configs (above) and any other info that would help to reproduce the issue
👍 1
j
will do
It happens randomly, but I noticed it previously only happened with our fsx and batch components
We are working on a component for rds and it started happening there, which is what prompted me to ask for help
🤞
a
can you try
!terraform.output
instead of
!terraform.state
(direct replacement, but slower and calls
terraform output
) - to provide more context
j
it happens intermittently, so not sure how switching to
!terraform.output
would provide more context
can you elaborate?
a
i wanted to know if using terraform.output will not have the same issue
what Atmos version are you using?
j
1.200.0
error when using
!terraform.output
Copy code
x Fetching wrapper.sqlserver.security_group_id // "MOCK__security_group_id" output from security-group in cfsb-aws-database-dev

 Error 

 Error: failed to get terraform output for component security-group in stack cfsb-aws-database-dev, output wrapper.sqlserver.security_group_id // "MOCK__security_group_id": failed to execute terraform output for the component security-group in the stack cfsb-aws-database-dev: manual setting of env var "TF_CLI_ARGS_apply" detected
e
It's interesting b/c you had similar issues with
!store
Would you be open to doing a call to review what you have? Not getting these reports from anyone else. Wondering if it's related to how you're using other features of atmos, such as templating mabye.
Not discounting that there is probably a bug, but also curious why we're not seeing other reports of this.
j
I would be open to a call 🙂
e
j
having issues where git can't get that branch - is there a rc release you can provide via
go install
?
e
Ya,
go install
is definitely leaves a lot to be desired 😉