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

[WIP] provider/aws: Add aws_workspace resource #7806

Closed
wants to merge 2 commits into from
Closed

[WIP] provider/aws: Add aws_workspace resource #7806

wants to merge 2 commits into from

Conversation

liamjbennett
Copy link
Contributor

@liamjbennett liamjbennett commented Jul 26, 2016

  • CRUD
  • Exported Attributes
  • Timeouts (> 20 mins)
  • Acceptance Tests
  • Docs

@liamjbennett
Copy link
Contributor Author

Question: how do I make the resource work with the count parameter?

@radeksimko
Copy link
Member

@liamjbennett It should just work out of the box - that's a terraform's core feature, not resource specific thing.

The only thing to keep in mind is that you can replicate resources, but not inner nested blocks inside resources. e.g. you can use count for aws_elb to create as many ELBs as you want, but you cannot use count for aws_elb.listeners to create N listeners for a given ELB.

@liamjbennett liamjbennett changed the title [WIP] provider/aws: Add aws_workspace resource provider/aws: Add aws_workspace resource Jul 27, 2016
foundBundles, err := findWorkspacesBundle("AMAZON", d.Get("bundle_name").(string), meta)

if err != nil {
log.Printf("Error finding bundle: %q", err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can wrap this log and return err into

return fmt.Errorf("Error finding bundle: %q"m err)

@stack72
Copy link
Contributor

stack72 commented Jul 27, 2016

Hey @liamjbennett

A few small comments inline. Nothing major.

Please can you drop the results of the test into the PR as well for reference :)

P.

@stack72 stack72 added the waiting-response An issue/pull request is waiting for a response from the community label Jul 27, 2016
@liamjbennett
Copy link
Contributor Author

@stack72 @radeksimko
Getting an error when running the first acceptence test:

panic: interface conversion: interface {} is nil, not *aws.AWSClient

Full Gist

@radeksimko
Copy link
Member

@liamjbennett Have a look at the diff of builtin/providers/aws/provider.go:

 -      ConfigureFunc: providerConfigure,

That's most likely the cause of that error 😉

@liamjbennett
Copy link
Contributor Author

@radeksimko Doh. Yes that solved the issue.

I am now getting a genuine test failure - which I beleieve might be something to do with the active directory dependency. Is there anyway to see the TF run that is executed as part of the test?

@radeksimko
Copy link
Member

Is there anyway to see the TF run that is executed as part of the test?

You mean to see the debug output from tests? Setting the right ENV variables may help: https://github.com/hashicorp/terraform/blob/master/website/source/docs/internals/debugging.html.md#debugging-terraform

@liamjbennett
Copy link
Contributor Author

This is currently blocked because the workspace api support registering the directory e.g.

https://docs.aws.amazon.com/workspaces/latest/adminguide/registration.html

@radeksimko radeksimko changed the title provider/aws: Add aws_workspace resource [WIP] provider/aws: Add aws_workspace resource Aug 16, 2016
@radeksimko radeksimko removed the waiting-response An issue/pull request is waiting for a response from the community label Aug 16, 2016
@liamjbennett
Copy link
Contributor Author

Ref: aws/aws-sdk-go#814

@liamjbennett
Copy link
Contributor Author

Given that we are unable to test this due to the missing api's and the total silence from aws on the matter I am going to close this PR for now and come back to it at a future point in time.

@jayyvis
Copy link

jayyvis commented Oct 8, 2017

@liamjbennett
If directory registration API is the only missing piece, then how about separating it out of workspace provisioning?

Cloud Formation currently handles it that way.

Before creating a Workspace in CloudFormation, you must register a Directory Service directory with Workspaces.

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html

@liamjbennett
Copy link
Contributor Author

@jayyvis yes we do that with cloud formation also but for the sake of this PR there is no way to actually run the tests without manually performing that registration, which is not acceptable.

@wmantly
Copy link

wmantly commented Nov 14, 2018

A year on, is there any way to get this done now?

@apparentlymart
Copy link
Contributor

Since the AWS provider is no longer developed in this repository, the tracking issue for this is hashicorp/terraform-provider-aws#434 . There will be no further updates posted here because the relevant code is no longer in this repository.

@hashicorp hashicorp locked as off-topic and limited conversation to collaborators Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants