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

terraform import of rancher_stack does not import current docker_compose and rancher_compose #11055

Closed
mcanevet opened this issue Jan 5, 2017 · 11 comments

Comments

@mcanevet
Copy link
Contributor

mcanevet commented Jan 5, 2017

Terraform Version

v0.8.2

Affected Resource(s)

  • rancher_stack

Terraform Configuration Files

resource "rancher_stack" "foo" {
  name = "foo"
  environment_id = "${var.environment_id}"

  docker_compose =<<EOF
foo:
  image: foo/bar
EOF

  rancher_compose =<<EOF
EOF
foo:
  scale: 1
}

Expected Behavior

Terraform import should import current docker_compose and rancher_compose.

Actual Behavior

Terraform import does not import current docker_compose and rancher_compose.

@johnrengelman
Copy link
Contributor

So you created a stack in Rancher and you're trying to import it into TF?
How was the stack created? Manually or using a catalog entry?

@mcanevet
Copy link
Contributor Author

@johnrengelman exactly. I created the stack using a catalog entry.

@johnrengelman
Copy link
Contributor

The docker_compose and rancher_compose values will not be imported in this case. However, there will be values in rendered_docker_compose and rendered_rancher_compose that correspond to the config that you can see in the Rancher API.
The docker_compose and rancher_compose values are incompatible with using the catalog entry for a stack.
This is due to how the Rancher API stores this data.

@mcanevet
Copy link
Contributor Author

@johnrengelman actually I have the same issue without using a catalog entry

@johnrengelman
Copy link
Contributor

Please post the config and what terraform plan says.

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

Closed via #11550

@stack72 stack72 closed this as completed Jan 31, 2017
@johnrengelman
Copy link
Contributor

@stack72 - how does this refreneced PR affect this issue? Doesnt seem related.

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

I'm going by the the OP put on the PR...

@johnrengelman
Copy link
Contributor

The "closed via" message has the wrong number (11500 vs 11550)

@stack72
Copy link
Contributor

stack72 commented Jan 31, 2017

d'oh! Sorry! Will fix now

@ghost
Copy link

ghost commented Apr 17, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants