terraform-plugin-sdk | Terraform Plugin SDK enables building plugins | Infrastructure Automation library
kandi X-RAY | terraform-plugin-sdk Summary
kandi X-RAY | terraform-plugin-sdk Summary
This SDK enables building Terraform plugin which allows Terraform's users to manage existing and popular service providers as well as custom in-house solutions. Terraform itself is a tool for building, changing, and versioning infrastructure safely and efficiently. You can find more about Terraform on its website and its GitHub repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of terraform-plugin-sdk
terraform-plugin-sdk Key Features
terraform-plugin-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on terraform-plugin-sdk
QUESTION
There're 2 properties for my terraform resource and one of them can be updated but the other can't so I want to mark it as immutable but when I open https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/schema/schema.go#L37, it seems like there's no such an option.
Can I mark a property as immutable in Terraform resource anyhow?
...ANSWER
Answered 2021-Sep-30 at 05:20If you mean an attribute, let's say I want to ignore changes to tags in a resource, then use
QUESTION
The other day I made a silly mistake when modifying some IAM policies on our terraform environment, I applied a change where I wanted to ADD a policy, when in fact it took this as the ONLY policy to exist so wiped out some of the vital IAM policies for service accounts to run GKE etc. Not my best day to say the least (an lesson learnt!).
Everything has been put back to normal manually for now, as the service account permissions were never set via TF anyway - they're the sort of permissions that are applied when enabling APIs on GCP so its done by them in the background. Our GKE cluster can now be managed again and can autoscale etc.
However, now when I run our terraform plan I receive a 500 error on a resource that was never previously a problem (redacted sensivite info):
...ANSWER
Answered 2021-Sep-13 at 06:39Update: This was due to a missing permission on the servicenetworking API. The default service account created needed roles/servicenetworking.serviceAgent
permission again after it had been wiped.
More details here
QUESTION
Some context: I'm in the process of writing my own TF provider with the following schema:
...ANSWER
Answered 2021-Jul-27 at 19:14As the error message states, the attribute foo
is referencing another undefined attribute bar
in its schema struct. You currently have no other attribute bar
defined according to your displayed code, so you would need to define it or reference a defined attribute.
If you added an attribute bar
like the following:
QUESTION
Due to this problem it looks like for providers you have to get a current version of the SDK (2.4.4 at time of post). This post has a lot of info on how to import a specific version of a package but surely every single provider writer isn't manually pulling the most recent version of the SDK (or are they)?
I'm new to Go/Terraform so maybe I'm missing something obvious but the providers I've found (including the official example) have something like:
...ANSWER
Answered 2021-Mar-08 at 03:45I figured it out. The behavior is controlled by the go.mod file.
In there you'll find:
QUESTION
I want to write a unit test for a method similar to this:
...ANSWER
Answered 2020-Aug-30 at 14:15schema.TestResourceDataRaw
does exactly that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install terraform-plugin-sdk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page