Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle warnings in terraform 0.12 #24

Closed
stbenjam opened this issue May 29, 2019 · 4 comments
Closed

Handle warnings in terraform 0.12 #24

stbenjam opened this issue May 29, 2019 · 4 comments

Comments

@stbenjam
Copy link
Member

stbenjam commented May 29, 2019

Terraform 0.12 is unhappy about inspection updating some of the properties:

level=debug msg="2019/05/29 17:20:00 [WARN] Provider \"ironic\" produced an unexpected new value for module.masters.ironic_node_v1.openshift-master-node[2], but we are tolerating it because it is using the legacy plugin SDK."
level=debug msg="    The following problems may be the cause of any confusing errors from downstream operations:"
level=debug msg="      - .owner: was null, but now cty.StringVal(\"\")"
level=debug msg="      - .conductor_group: was null, but now cty.StringVal(\"\")"
level=debug msg="      - .driver_info: inconsistent values for sensitive attribute"
level=debug msg="      - .properties[\"local_gb\"]: was cty.StringVal(\"50\"), but now cty.StringVal(\"49\")"
level=debug msg="      - .properties: new element \"capabilities\" has appeared"
level=debug msg="      - .properties: new element \"cpus\" has appeared"
level=debug msg="      - .properties: new element \"memory_mb\" has appeared"

Also:

level=debug msg="      - .candidate_nodes: planned value cty.UnknownVal(cty.List(cty.String)) does not match config value cty.ListVal([]cty.Value{cty.UnknownVal(cty.String), cty.UnknownVal(cty.String), cty.UnknownVal(cty.String)})"
@russellb
Copy link
Member

Was introspection enabled before? or is that new? If it's new, we could keep it disabled for now. Even if it was enabled, we hadn't been using that data yet, so I wouldn't block on it.

@stbenjam
Copy link
Member Author

The terraform provider only recently supported explicitly doing inspection, but it's not a big deal since Terraform reports:

we are tolerating it because it is using the legacy plugin SDK

Just something I have to fix eventually. Shouldn't block 4.2.

stbenjam added a commit to stbenjam/terraform-provider-ironic that referenced this issue Jun 3, 2019
fixes openshift-metal3#24

- When some values are unspecified (i.e. interfaces), Ironic sets
default values and returns the result. In 0.11, we specified these with
'Default', but the better approach - and the one that fixes the warnings
i n 0.12 - is to mark these as Computed. This informs Terraform that if
the resource doesn't explicitly define a value, then the API may provide
one to us when we refresh the resource.

-
stbenjam added a commit to stbenjam/terraform-provider-ironic that referenced this issue Jun 3, 2019
refs openshift-metal3#24

This partially addresses the issue. When some values are unspecified,
Ironic sets default values and returns the result the next time we
reload the resource. In 0.11, I used 'Default' to have terraform avoid
being surprised, but the better solution is to mark them Computed. This
informs terraform that if the resource doesn't define a value, Ironic
will. This removes most of the warnings in 0.12.
stbenjam added a commit to stbenjam/terraform-provider-ironic that referenced this issue Jun 3, 2019
refs openshift-metal3#24

This partially addresses the issue. When some values are unspecified,
Ironic sets default values and returns the result the next time we
reload the resource. In 0.11, I used 'Default' to have terraform avoid
being surprised, but the better solution is to mark them Computed. This
informs terraform that if the resource doesn't define a value, Ironic
will. This removes most of the warnings in 0.12.
stbenjam added a commit to stbenjam/terraform-provider-ironic that referenced this issue Jun 3, 2019
refs openshift-metal3#24

This partially addresses the issue. When some values are unspecified,
Ironic sets default values and returns the result the next time we
reload the resource. In 0.11, I used 'Default' to have terraform avoid
being surprised, but the better solution is to mark them Computed. This
informs terraform that if the resource doesn't define a value, Ironic
will. This removes most of the warnings in 0.12.
stbenjam added a commit that referenced this issue Jun 3, 2019
refs #24

This partially addresses the issue. When some values are unspecified,
Ironic sets default values and returns the result the next time we
reload the resource. In 0.11, I used 'Default' to have terraform avoid
being surprised, but the better solution is to mark them Computed. This
informs terraform that if the resource doesn't define a value, Ironic
will. This removes most of the warnings in 0.12.
@stbenjam stbenjam changed the title Handle updates from inspection Handle warnings in terraform 0.12 Jun 4, 2019
@stbenjam
Copy link
Member Author

stbenjam commented Jun 4, 2019

I think hashicorp/terraform#21576 addresses the issues with candidate nodes, so upgrading to 0.12.1 should fix that

@hardys
Copy link

hardys commented Dec 13, 2019

Sounds like this issue is now resolved, closing

@hardys hardys closed this as completed Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants