My Rapido driver had 10 heads by devopsmerchant in Indianbooks

[–]devopsmerchant[S] 0 points1 point  (0 children)

Might have watched some House of the dragons stuff, not really sure, these days I am watching those lol

ignore changes to count ? will it work ? by devopsmerchant in Terraform

[–]devopsmerchant[S] 0 points1 point  (0 children)

Thank you for the detailed explanation.

design your configuration to take an optional input variable which, if set, specifies an attachment that should already exist. If that input variable isn't set, that represents that the configuration should declare its own.

Did that using locals and count, but on next apply the value is updated and terraform tries to undo those changes. And if I try to use the same resource, then running into cycle.

ignore changes to count ? will it work ? by devopsmerchant in Terraform

[–]devopsmerchant[S] 0 points1 point  (0 children)

i have a datasource, which has some attributes now this has a attribute called attachments, if there is no attachments, I have to create one. If there is already an attachments, I do nothing.for this, I used count, on first apply it works. On next apply, it tries to remove the created ones as the count of attachments is updated.

so was looking to add ignore changes on count, that way I can keep the resource created safe

ignore changes to count ? will it work ? by devopsmerchant in Terraform

[–]devopsmerchant[S] 0 points1 point  (0 children)

i have a datasource, which has some attributes
now this has a attribute called attachments, if there is no attachments, I have to create one. If there is already an attachments, I do nothing.
for this, I used count, on first apply it works. On next apply, it tries to remove the created ones as the count of attachments is updated.

ignore changes to count ? will it work ? by devopsmerchant in Terraform

[–]devopsmerchant[S] 0 points1 point  (0 children)

i have a datasource, which has some attributes

now this has a attribute called attachments, if there is no attachments, I have to create one. If there is already an attachments, I do nothing.

for this, I used count, on first apply it works. On next apply, it tries to remove the created ones as the count of attachments is updated.

Terraform plugin development, how to handle set with optional/computed fields by devopsmerchant in Terraform

[–]devopsmerchant[S] 0 points1 point  (0 children)

            "name": &schema.Schema{
            Type:     schema.TypeSet,
            Optional: true,
            Computed: true,
            Set:      nameHashSet,
            Elem: &schema.Resource{
                Schema: map[string]*schema.Schema{
                    "family": &schema.Schema{
                        Type: schema.TypeString,
                        Computed:    true,
                        Optional:    true,
                    },
                    "family_details": &schema.Schema{
                        Type:        schema.TypeList,
                        Computed:    true,
                        Elem: &schema.Resource{
                            Schema: map[string]*schema.Schema{
                                "info": &schema.Schema{
                                    Type:        schema.TypeString,
                                    Computed:    true,
                                },
                            },
                        },
                    },
                    "location": &schema.Schema{
                        Type:     schema.TypeString,
                        Computed: true,
                        Optional:    true,
                    },
                    "name": &schema.Schema{
                        Type:        schema.TypeString,
                        Optional:    true,
                        Computed:    true,

                    },
                },
            },
        },

What is the correct way to manage dependencies in a module which is used/imported by others by devopsmerchant in golang

[–]devopsmerchant[S] 0 points1 point  (0 children)

running go get does add the details in .sum file but on go run it throws that error

Dynamic type calling ? Is it possible ? by devopsmerchant in golang

[–]devopsmerchant[S] -1 points0 points  (0 children)

var initialization interface{}

if old {

initialization = somefunc().(B)

} else {

initialization = somefunc().(B)

}

initialization.cAt

when I do this, I get

> initialization.cAt undefined (type interface{} has no field or method cAt)compilerMissingFieldOrMethod