-
Notifications
You must be signed in to change notification settings - Fork 674
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
Add SDSaaS to terraform provider #5772
base: master
Are you sure you want to change the base?
Add SDSaaS to terraform provider #5772
Conversation
The users will have to set the |
433ee5e
to
4ac83e3
Compare
90724f3
to
fcf8cad
Compare
fcf8cad
to
12e0ca5
Compare
Can we address conflicts and is this PR ready to merged? |
ibm/conns/config.go
Outdated
if session.sdsaasClientErr == nil { | ||
// Construct the service options. | ||
sdsaasClientOptions := &sdsaasv1.SdsaasV1Options{ | ||
URL: EnvFallBack([]string{"IBMCLOUD_SDS_ENDPOINT"}, ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the default url ? IBMCLOUD_SDS_ENDPOINT this env generally will be used to target other than prod environments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ours is an on-prem offering. This means that the endpoint a user will use, is going to be different for everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dylan-Christopherson
I think this is first service which is of type on-prem offering. I'm just worried how user's use this service in IBM Cloud via Projects(Deployable Archtecture)/Schematics .
Another option which comes into my mind is
Can we add sds_endpoint as required argument as part of each resource/datasource. Then set the URL as part of each method
endpoint := d.Get("sds_endpoint")
func getSDSConfigClient(meta interface{}, endpoint string) (<sdsconfigration>, error) {
sds, err := meta.(conns.ClientSession).SdsaasV1()
if err != nil {
return nil, err
}
url := conns.EnvFallBack([]string{"IBMCLOUD_SDS_ENDPOINT"}, endpoint)
sds.Service.Options.URL = url
return sdsconfigclient, nil
}
Something like this
terraform-provider-ibm/ibm/service/appconfiguration/resource_ibm_app_config_environment.go
Line 74 in 5882507
func getAppConfigClient(meta interface{}, guid string) (*appconfigurationv1.AppConfigurationV1, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hkantare I've added the sds_endpoint
to the resource schemas for both volume and hosts! I did some testing and I was able to set the sds_endpoint
in the example terraform and the resources created. I was also able to omit sds_endpoint
and just specify IBMCLOUD_SDS_ENDPOINT
in my environment and resources created. So both ways worked as expected
Hopefully I got the code how you were thinking, here is the commit with changes - b87313b
c2e6388
to
742211e
Compare
742211e
to
107c3df
Compare
@hkantare I've addressed all comments and conflicts. PR is ready to be reviewed and merged when ready. It would be great to get this in with the January beta Also, |
Can we move back to 1.22 since we have many dependencies for different services may or may not compatiable |
9dd37c1
to
ef59a18
Compare
ef59a18
to
b87313b
Compare
Done |
This PR adds terraform support for the software defined storage offering (Ceph as a Service). Terraform resources include volumes and hosts.
Community Note
Output from acceptance testing: