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

Automation Examples Scheme incorrect #115

Closed
SecretSquirrel-origami opened this issue Jan 6, 2025 · 4 comments
Closed

Automation Examples Scheme incorrect #115

SecretSquirrel-origami opened this issue Jan 6, 2025 · 4 comments

Comments

@SecretSquirrel-origami
Copy link

SecretSquirrel-origami commented Jan 6, 2025

Hi there,
I was previous using v0.0.13 of the provider and deploying automations with Jira templates.
However since bumping provider version to v0.0.18, I started experiencing various "Unexpected attribute" warnings in Visual Studio Code.

Ultimately my error, as I based my code from the Automation Jira examples, rather than reading all the scheme update for v0.0.18. But the Jira integration example is incorrect as it still includes what is now a deprecated attribute:

  jira_issue = {
    template_name = "My-Template" # name of Jira template
  }

checking the scheme, this example should probably be updated to:

jira_cloud_template = {
  template = "Jira-Bug" // Default Jira Template
  #parent_issue  = null  // optional
}

The is also true for webhook example, which also needs updating to reflect the v0.0.18 scheme.

My current Terraform version is: v1.10.3

@SecretSquirrel-origami SecretSquirrel-origami changed the title Automation.tf "Unexpected / Unexpected attribute" warnings Automation Examples Scheme incorrect Jan 7, 2025
@patrickb-orca
Copy link
Collaborator

Thank you for pointing this out! Let me investigate this and push a PR if the examples are outdated. Apologies for the inconvenience.

@patrickb-orca
Copy link
Collaborator

It appears there are 2 issues here.

First, it appears like 2 of my examples are wrong. I'm pushing a PR to fix this.

Second, I'm also seeing a few different "unexpected attribute" errors, even though my remote and local Terraform Provider binaries define those attributes. I've logged an issue with the Terraform VS Code Extension after some initial digging into the Orca provider. Here's why I don't think the issue is in the Orca provider:

  1. Enabled is defined in my api_client.Automation struct.
  2. The automation package is imported into provider.go.
  3. Enabled is defined in my automation.automationResourceModel struct.

@patrickb-orca
Copy link
Collaborator

For #2, I've lodged this issue with the VS Code Extesion: hashicorp/vscode-terraform#1681

@patrickb-orca
Copy link
Collaborator

For #1, this will be fixed in v0.0.19. I'd prefer not to make changes to published releases so as not to break user trust. Please reply here or open a new issue if either of these items appears unaddressed.

And thank you for your detailed reports!

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

2 participants