terraform | bash shell scripts for automating various tasks | Infrastructure Automation library
kandi X-RAY | terraform Summary
kandi X-RAY | terraform Summary
Terraform is an open source tool for infrastructure as code that enables you to safely and predictably create, change, and improve infrastructure.
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
terraform Key Features
terraform Examples and Code Snippets
Community Discussions
Trending Discussions on terraform
QUESTION
Trying to implement Azure WAF policy and associate with http listener the code was working fine until I try to include a new optional parameter called http_listener_ids
Tf code:
...ANSWER
Answered 2021-Jun-15 at 10:40The documentation for the azurerm_web_application_firewall_policy
resource is out of date but http_listener_ids
and path_based_rule_ids
are read only now (as of v2.55.0) so you can't set them and can only read them as an attribute of the resource.
QUESTION
I am trying to create a terraform module for aws_route_table creation, here is an example of this resource definition:
...ANSWER
Answered 2021-Jun-12 at 10:38Yes, you can create route
dynamically, because block route
acts as Attributes as Blocks. So you can do (example)
QUESTION
I'm writing a provider for terraform to interface with an API, here's the resource schema I have:
...ANSWER
Answered 2021-Jun-14 at 19:02Your go.mod
file suggests that you are using SDK version 1.17.2, where id
is indeed recorded as a reserved attribute name.
However, it no longer seems to be present in the latest SDK release, 2.6.1. It seems that this policy changed as a result of issue #607, and the change was released for the first time in SDK release v2.1.0.
While I can't explain why the code you've shared would be raising that error, you may be able to avoid the problem by upgrading to the latest SDK version. Since it's a new major release there may be some breaking changes to consider elsewhere in the API. There's a Terraform SDK v2 upgrade guide which describes the changes and also includes a link to the tf-sdk-migrator
tool which has some automation to help with the upgrade.
QUESTION
I have an AWS Step Functions state machine defined in a json file, in step1
(a lambda task), I saved three parameters in the ResultPath
:
ANSWER
Answered 2021-Jun-14 at 16:17As the error message implies, the string you pass to
s3path.$
is not valid JSONPath. If you want to pass some static value, you need to name it without.$
at the end (simplys3path
), otherwise, like in your case, it will be treated and validated as a JSONPath.Static params don't support any kind of string expansion to my knowledge, especially involving JSONPath. I would suggest passing param called
s3BucketName
in addition to year, month and day, and then simply construct S3 URL inside lambda function itself.
QUESTION
Attempting to use cyrilgdn/postgresql provider but terraform continues to attempt to load hashicorp/postgresql, this causes init to fail. Currently using terraform 1.0.0, although the problems happens on 14.1 too - have not upgraded from 12.x, always run 14.1 or newer on this work.
I've reduced the code to the below, nothing else in this folder and still get the problem
...ANSWER
Answered 2021-Jun-14 at 11:05It should be postgresql
, not postgres
:
QUESTION
trying to mount EFS to ECS Fargate but getting below error while task is being executed. it looks as though it is an IAM issue but crosschecked all the roles and unable to identify the issue. Checked security groups as well.i allowed 2049 port and attached ecs security group to it.
"ResourceInitializationError: failed to invoke EFS utils commands to set up EFS volumes: stderr: b'mount.nfs4: access denied by server while mounting 127.0.0.1:/' : unsuccessful EFS utils command execution; code: 32"
Terraform 0.12 and Fargate 1.4.0
...ANSWER
Answered 2021-Jun-09 at 15:01I had a related problem because the directory has not yet been created, there is a property in root_directory that allows creating the directory with proper permissions.
In the example I use root, but you can set another gid.
QUESTION
I have the Terraform script/template to provision a VM in Azure,it accepts the input and provision the VM along with the required resources.
I have created the Azure Storage Account and uploaded the script into the blob container.
We are using Jenkins as our CI/CD tool.
Now, I want to build the pipeline or automation using Jenkins which would take the necessary input and run Terraform script to provision the VM.
How do I build the Jenkins pipeline so that I can run the pipeline / automation multiple times and provision the individual VMs?
Any sample Jenkins pipeline would be really helpful.
...ANSWER
Answered 2021-Jun-12 at 16:59There is a dedicated architecture reference and sample available on the Azure documentation on Immutable Infrastructure CI/CD using Jenkins and Terraform on Azure Virtual Architecture
And here is the template
as well
QUESTION
I have written terraform code which:
- Creates IAM Role
- Creates lambda functions and attaches the above created role
- Dynamo DB table creation
- Creates API gateway, resources and adds POST method with lambda integration.
The first 3 steps works well. However while creating and configuring the API gateway, I am encountering below error in resource aws_api_gateway_integration & aws_lambda_permission, where I am trying to attach the lambda function "save_course" to the POST method under "courses" resource
...ANSWER
Answered 2021-Jun-12 at 22:21Change your locals from
QUESTION
My pipeline is going to be run across several different AWS accounts. Some accounts have all the S3 buckets needed, while some are missing some of the buckets.
I need my IAM policy to include ARNs of all S3 buckets if they exist. If an account has some s3 buckets that do not exist, those ARNs should be omitted from the policy. Something along the lines of:
...ANSWER
Answered 2021-Jun-12 at 01:36You can't do this with plain TF as TF does not have functionality to check if something exists or not. For such functionality you would have to develop probably an external resource in TF for that. You could also do same with aws_lambda_invocation.
What ever you choose, its ultimately up to you to implement logic for checking if something exists or not.
QUESTION
let say we have this locals:
...ANSWER
Answered 2021-Jun-12 at 01:17You can use a second nested dynamic
block to tell Terraform how many string_attribute_constraints
blocks to generate based on your rule:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install terraform
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