Comments (4)
This issue was fixed by version 0.24.3.
It works using type scm:
# awx_inventory_source.vault_sources will be created
+ resource "awx_inventory_source" "vault_sources" {
+ description = "demo"
+ id = (known after apply)
+ inventory_id = 106
+ name = "demo"
+ overwrite = true
+ overwrite_vars = true
+ source = "scm"
+ source_project_id = 95
+ update_cache_timeout = 30
+ update_on_launch = true
+ verbosity = 1
}
awx_inventory_source.vault_sources: Creating...
awx_inventory_source.vault_sources: Creation complete after 1s [id=810]
Or using EC2
# awx_inventory_source.vault_sources will be created
+ resource "awx_inventory_source" "vault_sources" {
+ description = "demo"
+ id = (known after apply)
+ inventory_id = 106
+ name = "demo"
+ overwrite = true
+ overwrite_vars = true
+ source = "ec2"
+ update_cache_timeout = 30
+ update_on_launch = true
+ verbosity = 1
}
awx_inventory_source.vault_sources: Creating...
awx_inventory_source.vault_sources: Creation complete after 0s [id=812]
from terraform-provider-awx.
Hi,
same issue here. Pls fix it.
AWX Version: 21.12.0
from terraform-provider-awx.
Still having this issue after such a long time without any kind of answer.
Figured out by myself the issue probably is related to this fix here: #20
Basically it seems that now it is mandatory to set the source_project_id
in the awx_inventory_source
even if the inventory kind
is not a scm
inventory. The source_project_id
should only be mandatory for scm
inventories.
Well, my inventory is not of scm kind, it is a regular one, empty string.
for_each = local.awx_inventories.vault
resource "awx_inventory" "awx_inventory_vault" {
name = each.value.name
description = each.value.description
kind = ""
If I set an aleatory but valid project ID in the inventory_source
it does not work:
resource "awx_inventory_source" "vault_sources" {
for_each = local.inventory_sources
inventory_id = awx_inventory.awx_inventory_vault[each.key].id
name = each.value.source_name
credential_id = data.awx_credential.aws.id
description = each.value.source_description
overwrite = true
update_on_launch = true
overwrite_vars = true
source = "ec2"
source_project_id = awx_project.awx_projects["master"].id
│
│ Unable to create Inventory Source got Errors:
│ - detail: [Cannot set source_project if not SCM type.]
╵
And if I don't set a project id it does not allow too:
# source_project_id = awx_project.awx_projects["master"].id
╷
│ Error: Unable to create Inventory Source
│
│ with awx_inventory_source.vault_sources["qa"],
│ on main.tf line 474, in resource "awx_inventory_source" "vault_sources":
│ 474: resource "awx_inventory_source" "vault_sources" {
│
│ Unable to create Inventory Source got Errors:
│ - detail: []
╵
╷
│ Error: Unable to update Inventory Source
│
│ with awx_inventory_source.vault_sources["staging"],
│ on main.tf line 474, in resource "awx_inventory_source" "vault_sources":
│ 474: resource "awx_inventory_source" "vault_sources" {
│
│ Unable to update Inventory Source with id 77: got Errors:
│ - source_project: [Invalid pk "0" - object does not exist.]
from terraform-provider-awx.
Looks like this PR #29 mentioned in this issue #19 will solve this error but for some reason the PR was not merged yet
from terraform-provider-awx.
Related Issues (20)
- Error creating schedule for job template HOT 4
- data_awx_workflow_job_template_node
- Related Groups in Inventories groups
- Any example on how to terraform AWX constructed inventories?
- awx_job_template not wait for the first scm update of the awx_project to completed prior to it creation HOT 1
- Awx create credential HOT 2
- unified_job_template_id only allow a single id with awx_workflow_job_template_node_success resource / failure / always
- Addition - Create AWX Instance and AWX Instance Group
- Job template surveys
- No documentation for resource job_template_launch HOT 1
- Add support param to job_template_launch HOT 1
- Awx Schedule updating fails After using Awx schedule Create HOT 2
- Data source aws_credentials doesn't work properly HOT 2
- Stack trace when printing an error message. HOT 2
- Add support to `ask_scm_branch_on_launch` for `awx_job_template` HOT 1
- Provider crashes with Go error HOT 1
- Add support to associate `instance_groups` to an `awx_inventory`
- awx_settings resouce not working
- Unable to create Schedule HOT 1
- Plugin Crash when creating awx_organization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-awx.